Trigger Definition
|
|---|
CREATE trigger [dbo].[TR_GLTRANSACTION_UPDATE] on [dbo].[GLTRANSACTION] after update as begin set nocount on; if update (ACCOUNT) and not update (GLACCOUNTID) update GLTRANSACTION set GLACCOUNTID = t3.ID, CHANGEDBYID = t2.CHANGEDBYID from dbo.GLTRANSACTION inner join inserted t2 on GLTRANSACTION.ID = t2.ID inner join dbo.GLACCOUNT t3 on t2.ACCOUNT = t3.ACCOUNTNUMBER end |
