0
votes
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;

1
Missing LIKE.jarlh
I added the amazon-redshift tag based on the error message. If you are using a different Amazon database service, then please change ita_horse_with_no_name
and path like '%login%' COLLATE SQL_Latin1_General_Cp1_CS_AS most probablySerg
still getting - Invalid operation: syntax error at or near "COLLATE" Position: 243; i added the like i forgot and still same errormeitale

1 Answers

0
votes

The default should be case sensitive, as explained in the documentation:

path like '%login%' 

For case-insensitive, use ilike:

path ilike '%login%'