Help me with this search condition pls in MS-ACCESS db
Hai,
I have an on-line shopping complex project. I want the search button there. For this, i want to do the exact-word search. May anyone help with this pls, this is very very urgent, pls. My database is MS-Access latest version, so "*" is not working in the search query.
I've four columns namely details, description, descriptionlong, SKU.
I'm searching my word from these four columns.
My Query is
tmpSQL1 = "(a.details LIKE "
tmpSQL2 = "(a.description LIKE "
tmpSQL3 = "(a.descriptionLong LIKE "
tmpSQL4 = "(a.SKU LIKE "
for i = 0 to Ubound(searchArr)
if i = Ubound(searchArr) then
tmpSQL1 = tmpSQL1 & "'%" & validSQL(searchArr(i),"A") & "%')"
tmpSQL2 = tmpSQL2 & "'%" & validSQL(searchArr(i),"A") & "%')"
tmpSQL3 = tmpSQL3 & "'%" & validSQL(searchArr(i),"A") & "%')"
tmpSQL4 = tmpSQL4 & "'%" & validSQL(searchArr(i),"A") & "%')"
else
tmpSQL1 = tmpSQL1 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.details LIKE "
tmpSQL2 = tmpSQL2 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.description LIKE "
tmpSQL3 = tmpSQL3 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.descriptionLong LIKE "
tmpSQL4 = tmpSQL4 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.SKU LIKE "
end if
next
If u want some more details, i had sent an attachment text file, please look into it. Will anyone help me on this pls.