[thelist] ASP ADO Quirks?
Anthony Baratta
Anthony at Baratta.com
Tue Nov 12 13:41:25 CST 2002
At 09:41 AM 11/12/2002, Burhan Khalid wrote:
>AB> At 09:01 AM 11/12/2002, Burhan Khalid wrote:
> >> "WHERE " &_
> >> "(((ArtAds.ArtAdArtist) Like '*" & strSearchText & "*')) " &_
> >> "OR (((ArtAds.ArtAdDesc) Like '*" & strSearchText & "*')) " &_
> >> "OR (((Categories.CategoryDesc) Like '*" & strSearchText & "*'))
> " &_
> >> "OR (((Subjects.SubjectDesc) Like '*" & strSearchText & "*'));"
>
>AB> Instead of * try %.
>
>Isn't the wildcard * instead of % on SQL Server?
I use % on SQL all the time.
From the SQL Online Book....
% Any string of zero or more characters.
e.g. WHERE title LIKE '%computer%' finds all book titles with the word
'computer' anywhere in the book title.
_ (underscore) Any single character.
e.g. WHERE au_fname LIKE '_ean' finds all four-letter first names that end
with ean (Dean, Sean, and so on).
[ ] Any single character within the specified range ([a-f]) or set
([abcdef]).
e.g. WHERE au_lname LIKE '[C-P]arsen' finds author last names ending with
arsen and beginning with any single character between C and P, for example
Carsen, Larsen, Karsen, and so on.
[^] Any single character not within the specified range ([^a-f]) or set
([^abcdef]).
e.g. WHERE au_lname LIKE 'de[^l]%' all author last names beginning with de
and where the following letter is not l.
---
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list