MySQL Forums
Forum List  »  Newbie

Query Assistance with seperate multiple words
Posted by: Todd Lane
Date: May 03, 2018 07:39PM

Hi,

Trying to work out how to approach the where in a query

I have a need to split a few words (by space) then the where part of query needs to search for any of those words.

So in other words a form field might have value 'The Cat sat on the mat'

& my query would be select * from tablea where columna has either 'the' or 'Cat' or 'sat' or 'on' or 'the' or 'mat'

It is likely that both the input & columna could have multiple words (normally only a couple), are not case sensitive, will vary in length & could even satisfy a couple (not all) of the words.

Was hoping for some assistance on how to achieve this?

Do the words have to be separated in say a stored procedure first?

Thanks in advance

Todd

Options: ReplyQuote


Subject
Written By
Posted
Query Assistance with seperate multiple words
May 03, 2018 07:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.