• G,

    I got the parameter sniffing vibe off that article.. I have always had really good performance off these kinds of queries because I have avoided the causes of that. As far as performance the where clause only gets evaluated once. The optimizer knows that if the variable is NULL that is already has a positive result so it doesn't even have to use that in the plan..

    I tend to think this is better than dynamic SQL.. But I may do some additional testing..

    CEWII