I have the following after insert trigger in attendence_date table:
CREATE TRIGGER Students_date
SET NOCOUNT ON
INSERT INTO mark_absent (attendence_ID, student_ID, mark_absent)
SELECT ad.attendence_ID, sc.student_ID, '0'
FROM dbo.attendence_date ad INNER JOIN
dbo.section_course sc ON ad.course_code = sc.course_code AND
ad.college = sc.college AND ad.section_name = sc.section_name AND
ad.routine_batch = sc.batchcode
Whenever I am firing the following TRIGGER, new data as well as the old data is again being inserted in the attendence_date table.
Can you tell me, how to avoid inserting duplicate data in the attendence_date by firing the following TRIGGER!
Please am in great need..PLEASE HELP!!