Question: SQL Insert of trigger. Create an INSTEAD OF trigger on INSERT Session Hours to enforce the rule that no tutor should work more than 60
SQL Insert of trigger.
Create an INSTEAD OF trigger on INSERT Session Hours to enforce the rule that no tutor should work more than 60 hours in a month. The logical steps before trying to actually write the trigger. It is easy to get confused if you don't have a clear recipe to follow: Get the date from the INSERTED table. Extract the month. Create a variable for the total hours. Assign to total the sum of each session for that month (assuming 30 minutes each). Check to see if the sum > 60 Check if it is output a message. Otherwise complete the insert into the Session table
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
