function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IdreesIdrees 

filter ACCOUNT where name field cotains ' as its filter value

Hi I have required to filter ACCOUNT records based on filter containing its name field with a value that also contains a ' (single quote). But when i execute this query as:
 
select id,name from account
where name = 'Claire's Ltd'
 
i found an error message as :
 
Query failed: MALFORMED_QUERY :
where name = 'Claire's Ltd'
 
Error at Row 2: Columns 22:
unexpected token: s
 
can any body help.
Thanks.
 
Muhammad Idrees,
Software Developer - Beyond Vision (Pvt.) Ltd.
 
 
 
 
CaptainObviousCaptainObvious

Try this:

where name = 'Claire\'s Ltd'

IdreesIdrees

Thanks Captain, It works fine. Your suggestion is great!