I've got a stored procedure in t-sql running on ms sql server 2005. I need to add an optional parameter in there so that if I pass in the parameter, then the stored proc filters on that value. If the value is not passed in, then the stored proc does not filter on that value.
The value passed in should be an integer. What is the syntax to accomplish this?