I'm trying to do a simple search of my database, and am running into more problems than I thought I would.To do the search I am using a stored procedure that looks like CREATE PROCEDURE spOrderSearch @orderID nvarchar(50),@customerID nvarchar(50)ASSELECT tblOrders.orderID FROM tblOrders, tblBoxes WHERE tblOrders.orderID=tblBoxes.orderIDAND tblOrders.orderID LIKE @orderIDAND tblOrders.customerID LIKE @customerIDGO
Unfortunetly, it isn't working so well. Both the customerID and orderID are int's in the database. If I try to use '%'s in the procedure i get errors.. Do I need to do this dynamically? If I don't have the % then the phrase has to be exact and not just a partial.What am I doning wrong?