ASP Wildcard Issue
-
I am attempting this function: IF tellere = "1" AND modelID <> "%HT" THEN mIDe2="error" I assumed that the "%" would act as a wild card, allowing me to take what the user inputs, look to see if it ends in "HT" and if it does, OK, and if it doesn't, return an error. I was wrong, the "%" doesn't work as a wildcard here. How would I accomplish this?
-
I am attempting this function: IF tellere = "1" AND modelID <> "%HT" THEN mIDe2="error" I assumed that the "%" would act as a wild card, allowing me to take what the user inputs, look to see if it ends in "HT" and if it does, OK, and if it doesn't, return an error. I was wrong, the "%" doesn't work as a wildcard here. How would I accomplish this?
Robby wrote: I assumed that the "%" would act as a wild card, * Someone correct me if I am wrong but... I think you are confusing SQL with ASP. As far as I know there is no wildcard for IF statements in ASP. So in SQL you could do:
SELECT * FROM [table] WHERE tellere = 1 AND modelID <> '%HT'
What you could do in ASP though is to use the INSTR func to return whether the specified string is in the var. regards, Paul Watson Bluegrass Cape Town, South Africa "Winning an argument on the internet is like winning a gold medal at the Special Olympics -- even though you're the champ, you're still a retard." - Kuro5hin.org Wrong but still funny