• Hi,

    try this sp

    create procedure XYZ (@A int)

    as

    begin

    1) Select * from table

    where

    and @a is null or @a = ''

    2) Select * from table

    where

    and @a is not null or @a ''

    3) Select * from table

    where /*col1*/ = (case when (@A is null) or( @a = '') then Col1 else @a end)

    END

    ARUN SAS