Viewing post 1 (of 1 total)
select
*
from
MyTable
where
(field1=@value1 or @value1 is null)
and
(field2=@value2 or @value2 is null)
That saves you from "pattern matching" for different types
March 4, 2004 at 4:53 pm
#497439