Question: PET SUPPLIES 1 . Create a trigger to be used when a Sales rep is eligible for a raise. HR will change the REP _

PET SUPPLIES 1. Create a trigger to be used when a Sales rep is eligible for a raise. HR will change the REP_RAISE field to True (1) when a Sales Rep is eligible for a 10% of their rate raise. Calculate their new rate (rate*1.1 to calculate the new rate) rounded to 2 digits after the decimal. Be sure to change REP_RAISE back to 0 once their raise has been applied. Use a cursor to allow for multiple reps to be eligible for a raise at the same time. Be sure to alter your previous trigger that attempted this or drop it before adding the capability for multiple reps at a time. 2. Create a trigger to be used when a customer cancels an order. When an invoice is cancelled, add the canceled item ids quantity back into stock in the item table. Use a cursor to allow for multiple invoice_line records for the cancelled invoice. Be sure to alter your previous trigger that attempted this or drop it before adding the capability for multiple invoice lines at a time. STUDENT HOUSING 3. Create a trigger to reduce the estimated hours on a service request when spent_hours are added. For example, if 3 additional hours are recorded as spent, reduce estimated hours by 3 for that specific service ID. Note: there may already be spent hours, so you will need to deduct only the NEW spent hours. Use a cursor to allow for multiple service request spent hours to be changed at the same time. Be sure to alter your previous trigger that attempted this or drop it before adding the capability for multiple reps at a time. 4. Create a trigger to increase monthly rent by 12.5%(rent*1.125) if a property is renovated (PROP_RENO = true/1/yes). Be sure to change PROP_RENO back to 0 once the rent has been modified. Use a cursor to Allow multiple properties to be renovated at once. Be sure to alter your previous trigger that attempted this or drop it before adding the capability for multiple properties at a time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!