SQL query syntax with WHERE and '%[ABC' clause

szadroga
szadroga used Ask the Experts™
on
I am trying to write a WHERE clause where the query returns and rows having the title containing the string '[ABC]'.  Users have included the brackets to identify specific rows but this contradicts the wildcard %.  Can I use ESCAPE?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Consultant
Top Expert 2016
Commented:
LIKE '%[[]ABC[]]%' 

Open in new window

or
LIKE '%\[ABC\]%' ESCAPE '\'

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial