You may want to use the wildcard (%) :
"SELECT * FROM LDSWSNames WHERE WSName LIKE '%" & strClass & "%'"
This will find all records containing *KYLEXAD01*
"SELECT * FROM LDSWSNames WHERE WSName LIKE '" & strClass & "%'"
This will find all records starting with KYLEXAD01*
"SELECT * FROM LDSWSNames WHERE WSName LIKE '%" & strClass & "'"
This will find all records ending with *KYLEXAD01
"Larry R. Baker" <lb****@eaglestrike.net> wrote in message
news:#5**************@TK2MSFTNGP10.phx.gbl...
I am having trouble with structuring my query for searching using "LIKE".
I return no records with my current SQL statement. Any suggestions would be
appreciated.
Here is the string I am sending through ASP using VBScript as my language.
Other piece:
strClass = Request("SiteLOCCode")
String from ASP page:
"SELECT * FROM LDSWSNames WHERE WSName LIKE '" & strClass & "' "
Output string from ASP:
SELECT * FROM LDSWSNames WHERE WSName LIKE 'KYLEXAD01'