We have a task that runs daily that will do a calculation based on current date and dates stored in the table. The problem is the task isn't selecting the newest dates in the table to do the calculation. It's selecting random dates that are stored in the table causing the calculation to be wrong. Is there a way to force the task to find the newest dates for the records?
I attached our trigger. The Qtr_Inspection_Master table houses all the inspections done on different units and each unit has multiple dates that inspections were completed. It's grabbing older Qtr_Inspection_Date lines instead of the newest causing the emails that are sent to be wrong showing inspections as past due even though the newest inspections with the newest dates are in the table.
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
matstein
We have a task that runs daily that will do a calculation based on current date and dates stored in the table. The problem is the task isn't selecting the newest dates in the table to do the calculation. It's selecting random dates that are stored in the table causing the calculation to be wrong. Is there a way to force the task to find the newest dates for the records?
I attached our trigger. The Qtr_Inspection_Master table houses all the inspections done on different units and each unit has multiple dates that inspections were completed. It's grabbing older Qtr_Inspection_Date lines instead of the newest causing the emails that are sent to be wrong showing inspections as past due even though the newest inspections with the newest dates are in the table.
Thank you for any help someone can provide
Link to comment
Share on other sites
2 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.