Getting LIKE %you%
Barry G. Sumpter
BarrySum at BigPond.Net.AU
Thu May 24 16:01:56 CDT 2007
Yes, Excellent call there John.
It IS case sensitive!
I hadn't even noticed that myself.
Select *
FROM [Documents]
WHERE Path
LIKE '%Valentina%'
AND [FileName]
LIKE '%Microsoft%'
You can have a look at my Valentina example
that uses sql Like example on http://www.BarrySumpter.com
This inconsistent use of [] was experimental and proved in my scenario not
to have any effect.
Just watch out for special characters:
Select *
FROM [Documents]
WHERE Path
LIKE '%E:\\\\Valentina\\\\Examples\\\\%'
AND [FileName]
LIKE '%Microsoft%'
hth
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Sims, John
(CDC/CCHP/NCBDDD) (CTR)
Sent: Friday, 25 May 2007 5:47 AM
To: Valentina Developers
Subject: RE: Getting LIKE %you%
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Chuck Pelto
> Sent: Thursday, May 24, 2007 3:37 PM
> To: Valentina Developers
> Subject: Getting LIKE %you%
>
> Okay....
>
> ...I ask a simple question....
>
> ...what is wrong with this SQL search text?
>
> SELECT recID, * FROM tbl_cont WHERE cont_namecomplete LIKE '%may%'
>
> It seems to me to be perfect. However, I'm not getting any
> returned records from the call...
>
> thisCursor = App.tDatabase.SQLSelect(sqlString,
> EVCursorLocation.kServerSide, EVLockType.kReadWrite,
> EVCursorDirection.kRandom) // where the sqlstring is the search text
>
> I know there is a record in there where cont_namecomplete
> includes the word "May".
>
> Regards,
>
> Chuck
Hi Chuck,
My first thought: does it contain "May" or "may"? I can't remember if
LIKE is case sensitive or not but my first thought is that it is case
sensitive. A quick look at the wiki docs may answer this question.
Sorry I don't have time to look at them myself.
-John
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list