Hi all. I'm new to writing triggers and simply couldn't think of getting something to work.
I am using DTS to import a csv file into a table called "tblChild". There is only one column, "ParentID", to insert. Some ParentID may already exist in the current tblChild. So the trigger should only add those ParentID that are new. In addition, a row should be added only if the ParentID also exists in a table in another database (dbParent.tblParent.ParentID). If it doesn't exist, write to a text file for logging.
Can triggers handle these tasks? Thanks in advance.
-NHW
I am using DTS to import a csv file into a table called "tblChild". There is only one column, "ParentID", to insert. Some ParentID may already exist in the current tblChild. So the trigger should only add those ParentID that are new. In addition, a row should be added only if the ParentID also exists in a table in another database (dbParent.tblParent.ParentID). If it doesn't exist, write to a text file for logging.
Can triggers handle these tasks? Thanks in advance.
-NHW