• Personally I'd write multiple views to cover the possibilities. How often would they change? If it's not that often (you have to judge that), I'd then just hit the right view.

    Might seem like more work, but probably would run better.

    Steve Jones

    sjones@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net