MySQL Forums
Forum List  »  General

Usin Parenthesis in LIKE does not work
Posted by: Larry Woods
Date: November 16, 2017 12:33PM

I am selecting a field with parentheses in it. My SELECT LIKE will not work. The field looks like this:

XXXXX (YYY)

I have tried the following and they DO NOT work:

SELECT FROM table WHERE field LIKE 'XXXX (%'

SELECT FROM table WHERE field LIKE 'XXXX \(%'


These DO work:

SELECT FROM table WHERE field LIKE 'XXXX %'

SELECT FROM table WHERE field LIKE 'XXXX _%'

On the other hand, this one does NOT work:

SELECT FROM table WHERE field LIKE 'XXXX _Y%'

What's the trick with parentheses?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Usin Parenthesis in LIKE does not work
November 16, 2017 12:33PM


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.