SELECT * FROM table WHERE date=@date AND (@abc IS NULL OR abc=@abc)
select * from table where date=@date
abc
if @date and @abc is not null begin "Your select statement" Where date=@date and abc=@abc end if @date is not null and @abc is null begin "Your select statement" Where date=@date end if @date is null and @abc is not null begin "Your select statement" Where abc=@abc end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)