Reputation: 36829
I have the following query
Select alpha_key,name,trading_as ,typeclient from client_details where upper(trading_as) like '%TEST\\''S LOGISTICS SERVICES%' order by name ;
does not return any rows but
Select alpha_key,name,trading_as ,typeclient from client_details where upper(trading_as) = 'TEST\\''S LOGISTICS SERVICES' order by name ;
returns a row.
Upvotes: 0
Views: 174
Reputation: 91375
You have to escape twice the backslash because there are a double interpretation, one when analizing the string and another one when compare with LIKE
.
So your request becomes:
Select alpha_key,name,trading_as ,typeclient
from client_details
where upper(trading_as) like '%TEST\\\\''S LOGISTICS SERVICES%'
order by name ;
Upvotes: 1