• memymasta (5/10/2013)


    I'm having trouble creating a simple derived table. It is so simple to create a derived table with multiple columns with:

    SELECT 1,2,3

    Feels like it shouldn't be much more difficult to create a derived table with one column and multiple tuples/rows.

    Is there a way to get following result without creating a temp table or specifying the whole DDL:

    derived table

    1

    2

    3

    Thanks

    Now that the others have answered, let me ask...

    I notice the numbers are sequential. Is that just by coincidence or do you really need a derived table of sequential numbers?

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