Home Forums SQL Server 2005 T-SQL (SS2K5) Problem with Select Statement RE: Problem with Select Statement
Ramesh Saive
SSC-Insane
Points: 24275
More actions
April 30, 2009 at 3:08 am
#986507
ezhil (4/30/2009)Thanks arun.Your third option works for me.:-)
ezhil (4/30/2009)
Your third option works for me.:-)
The third option can be re-written as
SELECT * FROM table WHERE ( @a IS NULL OR Col1 = @a )
[/CODE]
--Ramesh