So, you are stuck with a problem…
You need to find User names that are stored in the DB Users table, and that contain the apostrophe character. (eg. Susan D’Souza)
How do you go about it?
It took a while for my colleague and I to find the resolution to this, but thanks to the world wide web, we did find it. 😀
And now I am writing it down here for the benefit of any one else who stumbles across this entry while searching online for the solution. (and of course, for my future reference)
And it’s a very simple solution –
Instead of just one apostrophe character, write 2 of them consecutively in the LIKE criteria.
An Example is given below-
>> SELECT * FROM Users where UserName like ‘%D”Souza%’
The above query will give you the list of all the users that have “D’Souza” in their name.
Happy Querying and see you soon… 🙂