[英]How to do like compare on case sensitive string
select http_host,user_agent,date,path, count(*)
FROM "public"."bus_request"
where app_name = 'yyyy' and event_type <> 'browser_js'
and date <= GETDATE() and date>= GETDATE()-14 and request_score <> '80'
and path '%login%' COLLATE SQL_Latin1_General_Cp1_CS_AS
group by http_host,path, date, user_agent
order by http_host,date,count desc
I am getting error: SQL Error [500310] [42601]: Amazon Invalid operation: syntax error at or near "COLLATE" Position: 239; 我收到错误:SQL错误[500310] [42601]:亚马逊无效操作:语法错误在“COLLATE”或附近位置:239;
The default should be case sensitive , as explained in the documentation : 默认值应区分大小写 ,如文档中所述:
path like '%login%'
For case-insensitive, use ilike
: 对于不区分大小写,请使用ilike
:
path ilike '%login%'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.