Using an apostrophe in a Query

2583
3
09-26-2011 07:08 AM
JacksonTrappett
Occasional Contributor II
In the query feature endpoint, I need to be able to search for records which contain an apostrophe in the data, for example:
Johnston's Subdivision

If I submit a query like this:
SUBDIVISION like '%johnston's%'

The apostrophe in the middle ends up causing an error.  I have tried escaping it these two ways but neither worked:
\'

'

I also tried submitting double quotes like this:
SUBDIVISION like "%johnston's%"

No luck with that either.  Does anyone know what the correct way to do this is?
0 Kudos
3 Replies
TroyNagle
New Contributor II
Try using two single quotes 'Johnston''s Subdivision'
RandyBonds_Jr_
Occasional Contributor

Had a similar experience, thanks for the help!

0 Kudos
JacksonTrappett
Occasional Contributor II
That did the trick, thanks!
0 Kudos