SQL returns no records, but should

Barry G. Sumpter BarrySum at BigPond.Net.AU
Fri Jul 6 14:03:10 CDT 2007


Hi Scott,

I recall the LIKE clause being case sensitive.
And perhaps the special characters % are supposed to be prefixed with an
escape character like \ or \\?

I wrote about this on my web page with a FolderScanner Using Valentina
project on:
Www.barrysumpter.com


hth
     Barry G. Sumpter

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Scott Runkel
Sent: Saturday, 7 July 2007 4:56 AM
To: Valentina Developers
Subject: SQL returns no records, but should

Hi,

Does anyone know why the following would return no records? I for a fact
there 
are records with the phrase "most likely" or "MOST likely" in them.

SELECT *, recid FROM main WHERE (item_text like '%MOST likely%' OR
answer_text 
like '%MOST likely%' ) ORDER BY item_num

There's obviously just some little thing I'm missing. I'm using Val 2 and 
Director MX 2004. Case-sensitivity is off.

For comparison, the following returns plenty of records:

SELECT *, recid FROM main WHERE (item_text like '%MOST%' OR answer_text like

'%MOST%' ) AND (item_text like '%likely%' OR answer_text like '%likely%' )
ORDER 
BY item_num

-SR

Scott Runkel
Director of Technology
Hypix Media, Inc.
503-722-2123 


_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list