• Sanjay (2/2/2009)


    I got following error while compiling this x_TruncateTable proc:

    Server: Msg 197, Level 15, State 1, Procedure x_TruncateTable, Line 126

    EXECUTE cannot be used as a source when inserting into a table variable.

    plz clarify on this.I am executing it on sql server 2000.

    thx

    A little bit of simple troubleshooting (double clicking on the error message) shows that this code was never designed to work in SQL Server 2000. You will need to change the @fk table variable and all of it's references to a Temp Table in order for this to work in SQL Server 2000.

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