在PostgreSQL中显示错误的LIKE STATEMENT

时间:2018-08-29 11:19:38

标签: postgresql

    SELECT * FROM crosstab(' SELECT  "ASSET_HOSTNAME","ASSET_RESPONSE_TIME","ASSET_RESPONSE" from "SC_VNMS"."TBL_VNMS_ASSET_MONITORING_2018-08-28"
                   where "ASSET_HOSTNAME" LIKE \'%DS%\' ORDER  BY 1',
                   'SELECT DISTINCT "ASSET_RESPONSE_TIME"  from "SC_VNMS"."TBL_VNMS_ASSET_MONITORING_2018-08-28"  
                   ORDER BY "ASSET_RESPONSE_TIME" ASC' ) 
                   AS("ASSET_HOSTNAME" text,"2018-08-28 09:05:00" text, "2018-08-28 09:06:00" text, 
                      "2018-08-28 11:07:00" text, "2018-08-28 11:08:00" text)

错误:“ \”或附近的语法错误 第2行:“ ASSET_HOSTNAME”类似于\'%DS%\'ORDER BY 1',                                           ^ SQL状态:42601字符:186

0 个答案:

没有答案