An approach that has worked for me in the past and may work for you. Declare
as many parms as you can possibly need and then code the statement like
this:

<sql>
SELECT * FROM someWhere
WHERE @parm1 = 123 OR @parm1 IS NULL
AND @parm2 = 345 OR @parm2 IS NULL
-- etc.

This has the desired effect and eliminates the need for a temp table or
actual table (inno or otherwise). The trick here is to pass the maximum
number of parms, even if they are Nulls.

HTH,
Arthur

Reply via email to