Hi friends,
I need to insert data from one database table to another database table by after Insert trigger. Now
I need to check whether that another database table already have the data or not. If there already have the data then do some exception but not show error.
CREATE TRIGGER [dbo].[TRIG_TABLE1] ON [dbo].[Table1] AFTER INSERT AS BEGIN INSERT INTO Table2(CustID,DateCreated,DateModify) SELECT CustID, DateCreated, DateModify FROM INSERTED END
I have done this far but can not check whether the table already have the data or not. Please solve this problem.
Thanks in advance.