I'm trying to create a search form with two text boxes. The first is a Work Order ID text box. The second is an Email text box. My SQL looks like this:
SELECT *
FROM dbo.Request2
WHERE Order_ID = 'varID' OR Email LIKE 'varEmail'
Name Default Value Run-time Value
varID 0 Request.Form("txtID")
varEmail % Request.Form("txtEmail")
My question is concerning the default value for the varID variable. This is datatype INT in the database but I want to put in a special character like % but I keep getting an error because that percent sign is not numeric. Is there something else that I can put in it's place? This error occurs when someone wants to search only by Email and leaves the Work Order ID text box blank. Any suggestions would be appreciated.
SELECT *
FROM dbo.Request2
WHERE Order_ID = 'varID' OR Email LIKE 'varEmail'
Name Default Value Run-time Value
varID 0 Request.Form("txtID")
varEmail % Request.Form("txtEmail")
My question is concerning the default value for the varID variable. This is datatype INT in the database but I want to put in a special character like % but I keep getting an error because that percent sign is not numeric. Is there something else that I can put in it's place? This error occurs when someone wants to search only by Email and leaves the Work Order ID text box blank. Any suggestions would be appreciated.