[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2016-10-05
1
Medium Priority
?
82 Views
Last Modified: 2016-10-05
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?
0
Comment
Question by:szadroga
1 Comment
 
LVL 71

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41830604
LIKE '%[[]ABC[]]%' 

Open in new window

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

Open in new window

1

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question