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
SwapnaSwapna 

Problem with ampersand(&) in soql query

Hi,

 

I have a query in APEX Trigger in which im comparing a field with a value.

This value can have & in it.

Whenever there is an & in the value, my query is not returning any values.

Can any one help me overcome it.

How to escape & in a SOQL query.

 

Please help.

 

Thanks

Swapna

Kauser Fatima 7Kauser Fatima 7
Hi Swapna. Were you able to resolve this? Is there a workaround for this? I'm facing a similar issue where in the SOQL if the picklist value has '&' in it, it returns an error.