• Worse than that, it's been my experience (in SQL Server 7) that a SELECT such as yours will create a separate instance of the view, in memory, for each named instance in the SELECT.  If the views have a lot of rows, that could quickly drive your server into a "swap file" run.  Perhaps they fixed this "little" problem in SQL Server 2000?

    One way to get around this problem is to use CASE statments instead of SELECTs to create each field.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions