Hello,
In theory your SP should work. It depends what is being passed in when no parameter value is supplied e.g. if it is a Null or a string of spaces then the Like will not work.
You could try using RTrim(IsNull(@ProductId, '')) in the Where clause instead. (Same for @Description too).
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group