im migrating data from excel to database (lookup_student table) ad from this table i want to migrate data into another table (student_details) by selecting only distinct values, should not repeat data.
i have tried with insertion trigger on lookup_student table so that when data gets inserted into this table then automatically it should fire trigger ny selecting only distinct values and gets inserted into another table (student_details).
I have an another idea. We can migrate data from excel to our database using SSIS this table will be our dummy table. we will create another main table and we will fire trigegr. insertion on dummy table will insert values in the main table as well as in the mean time we can insert only unique values in that table
Originally Posted by pootle flump
I would not use a trigger. I would use a procedure. Using a trigger introduces complications.
Originally Posted by blindman
The same process that loads the staging table can fire the sproc when it is finished.
Do not use a trigger. That will cause a lot of complications for debugging the process.