Home Forums SQL Server 2005 T-SQL (SS2K5) how to check multiple combinations of a variable for null RE: how to check multiple combinations of a variable for null

  • Yes, giving the user a choice of whether to search on product name, sku, descripition or product id. Recently discoverd that I can concatenate and execute a string e.g. exec(SELECT ' + @productid + ',' + @productname + ',' .... . But now the hard part on how to build the where clause. I am passing the contents of a checkbox control so i need to check for a 1 or 0. Any help or anyother way i can do this without chagning the business logic? thanks