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

searching for quote (") in an iSQL statement

Status
Not open for further replies.
Jun 2, 2004
24
US
Hello,

trying to find a double-quote (") in a varchar field.
How do we do this?

I have tried these, but obviously there are three sets of quotes and it doesn't like that. Aside from unloading the table and using other tools to find it, can we comment out the quote so it will return those matching the criteria?

select * from tocs where toc_name like "%"%"
select * from tocs where toc_name like "%\"%"
 
Hi:

Try the matches keyword using single quotes:

select * from tocs where toc_name matches '*\"*'

At least on solaris 7 system running 7.31 online, the \ is optional.

Regards,


Ed
 
excellent! Thanks again, Ed.
And I discovered that wrapping the string in double-quotes will allow me search for two single-quotes in my data.

select * from tocs where toc_name matches "%'%'%
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top