I'm using a WHERE clause in a stored procedure like the one illustrated below. In this example the effected records are the records where the OrderID = 1,2,3,4,5.
I'm trying to figure out how I can specify a range of numbers instead of identifying each one individually. I'd like to do something like...
Obviously I know I can't use the IN statement to accomplish this. But could someone give me an idea of how I could specify a range? Thanks.
--
Mike
Code:
WHERE (ID = @ID) AND (OrderID IN (1,2,3,4,5))
Code:
WHERE (ID = @ID) AND (OrderID IN (1-5))
Obviously I know I can't use the IN statement to accomplish this. But could someone give me an idea of how I could specify a range? Thanks.
--
Mike