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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

condition like '%'%' 2

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hi All,

I'm trying to search for customer's name with an apostrophen how can I do that?

I'm testing it in Query analyzer and this won't work:

Select * from CustTable where customerName like '%'%'

Thanks.
 
Double the single-quote within the percents, like this...

Code:
Select * from CustTable where customerName like '%'[!]'[/!]%'


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top