• SQL Server and all relational databases aren't much more than glorified file handlers. If you accept them as that, then you'll see the falacy of trying to do things like inheritence and the wad of other stuff people think it should do. SQL is not a full fledged language nor should it be. It's a simple file handling language. Tables are really nothing more than files with lines (rows) and fields (columns). It's a very simple thing... why do people keep trying to make it more complex?

    And the automatic elimination of duplicates from queries won't fix anything... the engine will still have to remove them if someone writes stupid code that generates the duplicates either due to bad table design or, like I said, stupid code. Learn how to use the language and stop looking for it to make up for a lack of knowledge.

    --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)