I need some help figuring out the issue with my trigger. Currently, it inserts nothing into my tbl_ggl_job_lines_dates table. In previous iterations, it has inserted duplicates of the same record. What it does is make a line from the feeder table which is this #inserted table. Then it should use this trigger to create a matching line in the dates table with some info filled in from the feeder table. The feeder table only has the Job ID which can have many Line Numbers within it. The dates table only has the Line Number. The #inserted table has both. Thus the two joins.
The where statement is supposed to ensure that I don't pick up duplicate records but I'm not picking up any records.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
pmcfarlain
I need some help figuring out the issue with my trigger. Currently, it inserts nothing into my tbl_ggl_job_lines_dates table. In previous iterations, it has inserted duplicates of the same record. What it does is make a line from the feeder table which is this #inserted table. Then it should use this trigger to create a matching line in the dates table with some info filled in from the feeder table. The feeder table only has the Job ID which can have many Line Numbers within it. The dates table only has the Line Number. The #inserted table has both. Thus the two joins.
The where statement is supposed to ensure that I don't pick up duplicate records but I'm not picking up any records.
Any help would be appreciated. Thanks!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.