Jump to content

Search for Data containing quote mark


chemfree

Recommended Posts

A filed in my data has some words that are imported with quote marks on either side of the word. I need to be able to search the records to find the rows containing them as well as those which don't.

 

The data may look someting like: Alfred "T" or Alfred T.

 

When I use 'like  %string%' in the WHERE clause of the SQL and use 'Alfred "T" as the search input, I get no results. However, if I use '"' as the search input, Alfred "T" will be found. If, I use 'Alf' as the string input, MySQL finds 'Alfred T', but not 'Alfred "T"'.

 

I do not want to strip the quote from the data as they are unique names that may include the quote"

 

What should my SQL look like to find names with or wihout the quote in the field?

 

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.