Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to ESCAPE a single quote

Status
Not open for further replies.

EchoAlertcom

IS-IT--Management
Joined
Oct 8, 2002
Messages
239
Location
US
Hello,

I am trying to search a column in our database for a single quote ('). Since it is a varchar column and the is the delimiter it isn't letting me search for '.

Select UID, EmailAddr from dbo.users where emailaddr like '%!'%' ESCAPE '!'

Can anyone help me out please?

Sincerely,
Steve
 
Code:
Select UID, EmailAddr 
from dbo.users 
where emailaddr like '%''%'

The escape clause is used to define an escape character for woildcards in a search pattern.
 
Try putting the quote in brackets.

like '%[']%'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top