• I do the same thing as what Scott identified above. I use sys.sql_modules and other system tables to help me on such tasks. Just be aware that comments will frequently give false returns when searching for common names like "Client" or "User(s)" or "Employee(s)", etc.

    Heh... but, not to worry. According to a lot of the code I've seen, comments won't interfere because (unfortunately) so few people actually use them. 😛

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