Home Forums SQL Server 2012 SQL Server 2012 - T-SQL SELECT Multiple criterias if not null RE: SELECT Multiple criterias if not null
John Mitchell-245523
SSC Guru
Points: 148809
More actions
September 2, 2014 at 2:57 am
#1742331
Comparing any value to NULL will return False. Please will you show us your query?
John
Edit - I think I see what you're trying to do. Will this work?
WHERE COALESCE(TyreID, @TyreID) = @TyreID
AND COALESCE(CarID, @CarID) = @CarID
AND ...