pass sp value to trigger code

  • Does anyone know any tricks to pass a stored procedure variable to some trigger code? My specific need, for auditing purposes, is to pass a value (or two) from a stored proc that does an insert/update. The target table has some trigger code, which when run, turns around and populates a table in a custom audit solution. The trigger code works good, but just need to add another value or two to the audit table

    Another forum post talked about storing the value into a 1 row X 1 col table, but I'm worried about contention issues.

    Any thoughts would be appreciated.

    Thanks,

    joe

  • if i understand you, the stored procedure will be updating a target table and a trigger on that table will adding data to an audit table.

    if so, why not add the new values generated by the stored proc as columns to the target table? then the values will be explicitly associated with the data that is being audited.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply