I just found out that we are importing the same data multiple times throuought the day in a new table. Since I cannot query information inserted as it is coming from a text file, I need to write an insert trigger that will add the record if the IDNumber does not exist. If it does exist do not insert the record and continue. How would I do this?
I have so far:
CREATE TRIGGER Remover ON [dbo].[SMDR]
FOR INSERT
AS
Begin
Select IDNumber from inserted
(Now I need to know how to match it up in the table to find out if it already exists. If it does, do not insert, if it does not, insert it)
end
I have so far:
CREATE TRIGGER Remover ON [dbo].[SMDR]
FOR INSERT
AS
Begin
Select IDNumber from inserted
(Now I need to know how to match it up in the table to find out if it already exists. If it does, do not insert, if it does not, insert it)
end