|
|
|
|
|
| | |
|
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Wildcards in SQL statements |
From: |
Oscar |
Date: |
3/9/2000 12:20:16 AM |
IP: |
207.235.95.76 |
The like statement will work with the wildcard syntax of "%" or "*". The "%" character is what I use as a wildcard character in a SQL 7 database. I am not sure if it is the "%" or "*".
SQL="SELECT manTBL.Mfg FROM manTBL
WHERE (((manTBL.Mfg) Like *" & targetString & "))"
Remember that the "*" is only wild depending on the location of the character. For instance *umber will return number,lumber,etc.
day* will return daily,daytime,etc.
*32* will return 13245,24432566,etc.
Another thing I noticed is that a string needs to be encased in single quotes. string
Locate the string first without the wildcard then try out the different ways to search using wildcards.
Try:
SQL="SELECT manTBL.Mfg FROM manTBL
WHERE manTBL.Mfg Like *" & targetString & ""
Hope this helps
|
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|