• Ive used the following to retrieve the table name;

    declare @TbleName nvarchar(324)

    SET @TbleName=(Select name from sysobjects where sysobjects.id = (select parent_obj from sysobjects where sysobjects.id =@@PROCID))

    Of course then what you do with the @TblName value is up to you, throw it into a table somewhere, or a variable for later use.

    Rick Brown


    Rick Brown