Re: Global Variables?

From: Russell Fields (RussellFields_at_NoMailPlease.Com)
Date: 03/09/04


Date: Tue, 9 Mar 2004 13:45:25 -0500

kb,

Why have a second trigger do this? Can you call a stored procedure from the
first trigger and pass the needed info into it? That would get you out of
the game of coordinating triggers.

FYI, the "inserted" table does not really exist, it is a view across entries
in the transaction log. Therefore, non-updateable. You could, of course,
reupdate the row in the base table, but think about that and recursive
issues before you do it.

Russell Fields
"kb" <anonymous@discussions.microsoft.com> wrote in message
news:214D4B58-B94E-4C79-8948-54C37E2005D6@microsoft.com...
> Is there any way to declare a variable so that I can set the value in one
trigger (that sets a status to indicate a duplicate record) and have it read
into a second trigger (that writes that status to an audit trail?) I've
tried a couple of different ideas to get this status to write correctly and
it doesn't seem to work. The easiest way would be to update the "inserted"
table, but it says it doesn't allow that.
> Thanks



Relevant Pages

  • Re: => Unorthodox DB Updates - Trigger order
    ... But if you have any suggestions for trigger ordering it ... The last trigger is fired on each update of SupplierOrder. ... collectionMovementID into the SupplierOrder rows in the second trigger ... a second statement if it is really necessary. ...
    (microsoft.public.sqlserver.mseq)
  • Re: system trigger question
    ... so it isn't recognised as a completed PL/SQL trigger. ... selects in system triggers so the original code for the second trigger ... compiles error-free. ...
    (comp.databases.oracle.server)
  • Re: How to solve trigger side effects
    ... Each trigger belongs to a certain table. ... So I can deactivate the second trigger, ... The package consists of a local variable, ...
    (comp.databases.oracle.misc)
  • How to solve trigger side effects
    ... Each trigger belongs to a certain table. ... changes data in that table having the other trigger. ... So I can deactivate the second trigger, ...
    (comp.databases.oracle.misc)
  • Re: SQL trigger question
    ... functionality of the trigger, and sure enough, my EID showed up in my ... terminates/resigns/whatever AND has a valid ACS user account. ... and has met the conditions defined by the first trigger. ... if padata is not null then update store.pacs260 set usract = 'N' ...
    (comp.sys.ibm.as400.misc)