Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create TRIGGER [Billing].[Installments_InsertDeleteUpdate_History]
- ON [Billing].[Installments]
- AFTER INSERT, DELETE, UPDATE
- AS BEGIN
- Insert Into Billing_History.Installments
- Select *, GetDate(), 0 From Inserted
- If Not Exists (Select * From Inserted)
- Insert Into Billing_History.Installments
- Select *, GetDate(), 1 From Deleted
- SET NOCOUNT ON;
- -- Insert statements for trigger here
- Create TRIGGER [Billing].[Installments_InsertDeleteUpdate_History]
- ON [Billing].[Installments]
- AFTER INSERT, DELETE, UPDATE
- AS BEGIN
- If Not Exists (Select * From Inserted)
- Insert Into Billing_History.Installments
- Select *, GetDate(), 1 From Deleted
- ELSE
- Insert Into Billing_History.Installments
- Select *, GetDate(), 0 From Inserted
- SET NOCOUNT ON;
- -- Insert statements for trigger here
Add Comment
Please, Sign In to add comment