thandel
asked on
SQL Syntax
I am trying to run an SQL command ... I have it working as:
sSql = "SELECT * FROM tClaim WHERE ClaimNo = " & """" & sLab & """"
but I need to do a wild card search and trim the variable..... so I tried this:
sSql = "SELECT * FROM tClaim WHERE ClaimNo Like "" * "" & Trim(sLab) & "" * """
This just ends up freezing up MS Access.
What is wrong with my SQL statement looking for a wild card?
Thank you.
sSql = "SELECT * FROM tClaim WHERE ClaimNo = " & """" & sLab & """"
but I need to do a wild card search and trim the variable..... so I tried this:
sSql = "SELECT * FROM tClaim WHERE ClaimNo Like "" * "" & Trim(sLab) & "" * """
This just ends up freezing up MS Access.
What is wrong with my SQL statement looking for a wild card?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I edited my question and had removed the equal sign but missed the single quotes.... that worked thanks Paul!
anyway...
this part :
can be simplified to as what I already shown
this part :
Like " & "'*"
can be simplified to as what I already shown
Open in new window