I have a field in the database that supports up to 8 characters. I would like to use * as a wildcard type and ? as a wildcard type. So, if I used 4AWL* and 4AWL??99, the * is for anything after and the ?? is just for characters 5 and 6 in that field. So, for me, building this type of SQL statement seems close to impossible.
I was thinking of something like, if the left(1) character is a ?, then do whatever, or if left() is a * then do whatever, etc, etc.
But I don't know if that would even work. Any thoughts?
To keep this simple, my basic SQL statement would be:
SQL = "SELECT Details.VRM from ReadsDetails"
SQL = SQL & " WHERE Details.VRM LIKE '" & Ucase(Request.QueryString("code"))& "'"
"code" is the string that the user would input on the html document that would fire off the asp.
I was thinking of something like, if the left(1) character is a ?, then do whatever, or if left() is a * then do whatever, etc, etc.
But I don't know if that would even work. Any thoughts?
To keep this simple, my basic SQL statement would be:
SQL = "SELECT Details.VRM from ReadsDetails"
SQL = SQL & " WHERE Details.VRM LIKE '" & Ucase(Request.QueryString("code"))& "'"
"code" is the string that the user would input on the html document that would fire off the asp.