can't use = and don't want to use LIKE in WHERE
sSQL = "SELECT * " & _
" FROM MasterTableCfoapal2" & _
" WHERE ACCOUNT LIKE '%" & Request.Form("search_string") & "%'" & _
" or SUB LIKE '%" & Request.Form("search_string") & "%'" & _
" or Division LIKE '%" & Request.Form("search_string") & "%'" & _
" or DIRECTOR = '%" & Request.Form("search_string") & "%'" & _
" ORDER BY ACCOUNT, SUB"
set rs = Connect.Execute(sSQL)
For some reason when I look for a "DIRECTOR" I always get no replies. Do I need to do something like chomp the string before checking it? How? I can use "LIKE" instead of "=" but then I get some items from other parts of the search that I don't want.
|