query with parenthesis

Gregory Kowalski gregkowalski at earthlink.net
Thu Oct 7 17:40:05 CDT 2004


Hello,

I am having trouble making queries for strings that contain parentheses.

I have a field called "form" that, among others,  contains the 
following string:

Purified F(ab')2

When I make a query using the expression:

keyword = "Purified F(ab')2"

"select * from TABLE where form = '"&keyword&"' "

I get no results.

If the keyword contains no parentheses correct results appear.

i.e: keyword = "Liquid" (or whatever)


The field in question is ASCII, Varchar and indexed.  I changed to 
English, but it didn't work either.



I did a sensitive test using the LIKE expression:

"select * from Table where form LIKE '"&keyword&"' "


If keyword = "ab"  or "2"  I get the right results - "Purified F(ab')2"

But if I use keyword = "(ab"  or "(ab')", or even just "(" all records 
appear as the result (!!!).  The problem also appears if keyword = "'"

It therefore seems as if the parenthesis and apostrophe are problematic.

Any help would be greatly appreciated.

Thanks

Greg

















More information about the Valentina mailing list