TR_GLTRANSACTION_INSERT
Definition
Copy
CREATE trigger [dbo].[TR_GLTRANSACTION_INSERT]
on [dbo].[GLTRANSACTION]
after insert
as
begin
set nocount on;
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
where GLTRANSACTION.GLACCOUNTID is null
end