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

problem with query

Status
Not open for further replies.

VBmim

Programmer
Joined
Jun 25, 2001
Messages
361
Location
BE
Hello y'all

I must check my article-database for descriptions containing a '. With the query
select * from articleTable where description like '%'' '
I am getting nowhere...

Does anybody have a clue on this?

tnx in advance

Mim
 
Try using two double-quotes? ex: '%""'

I am assuming you are trying to look for records in articletable that have a double-quote (") at the end of the description column?

Did it work? :-)
 
If your wanting a result set with records whose description contains a double quote you could use...
SELECT * FROM articleTable WHERE CHARINDEX('"',description) > 0 JHall
 
Tnx for your fast response!!!
I cleared it up already...
I use a function instr() in visual basic which lets me search for a string in a string...

What I was realy looking for is a query for finding the descriptions with a single quote in it... Can I also use charindex for this? I don't need it now, but I realy like to know...

greetz

Mim
 
Sure can. I think you can even include this function in SQL Statement in a user defined function because the CHARINDEX() function is deterministic. Also check out PATINDEX() it is also a very useful function. JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top