• I don't work with Oracle anymore but you don't need a loop for any of this and you probably don't need dynamic SQL for it either. Oracle has all of the information stored in system tables and you just need to hit the books and find out what they are. It will also help your career to learn of such things especially if you're going to be working with Oracle for a while.

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