I have a stored procedure that is called by a windows application that returns a resultset that populates a datagrid. The app gives the option to enter a customer id to narrow down the search by customer id. Using one query, how might I write my where clause to either bring back records only matching the passed in customer id or all records if I pass in a zero (which is what I do if no customer id was entered). Thanks in advance.