if IsNull(@ID,0) 0
Select ... where col = @ID
else
Select ...
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sometimes, winning is not an issue but trying.
You can check my BLOG [font="Arial Black"]
here[/font][/url][/right]