Return results that contain or do not contain punctuation

by nullReference   Last Updated November 14, 2017 18:06 PM

Is there a way within MySQL to return results using a LIKE statement that contain or do not contain punctuation characters such as apostrophes and hyphens?

For example if I have one of the following queries:

SELECT * FROM some_table WHERE some_value LIKE "%this-thing%";

or

SELECT * FROM some_table WHERE some_value LIKE "%person's thing%"

Is there a way in which I could obtain the same results as the queries below but with a single LIKE clause?

SELECT * FROM some_table WHERE (some_value LIKE "%this-thing%") OR (some_value LIKE "%this thing%");

or

SELECT * FROM some_table WHERE (some_value LIKE "%person's thing%") OR (some_value LIKE "%persons thing%");

Basically a function that when searching would return a result if either version of the text exists ("person's thing" or "persons thing")?



Related Questions




Search on concatenate columns

Updated October 12, 2017 08:06 AM

How to implement a "Command T" (VIM) like search

Updated September 19, 2017 16:06 PM