Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project three part 4 Procedures and Triggers In this project you will develop five procedures for Alpine Adventures that will be stored on the server.
Project three part 4 Procedures and Triggers In this project you will develop five procedures for Alpine Adventures that will be stored on the server. A Procedure is a block code that accomplishes a task. You will follow the steps that were outlined in the Procedure Tutorial. Be sure to test if the procedure exists so you can drop it if necessary and test that each procedure works correctly. Procedure 1: Write a procedure to update the quantity on hand column in the inventory table. It will accept two arguments (iny id, qty). It does not return any value. The qty passed into the procedure will be added to the quantity, on hand in the table. Name the procedure sp UpdateInventory Procedure 2: Write a procedure that will insert a row into the Orders table. It will accept arguments for each of the columns (except the order id because that is generated by SQL Server). Name the procedure sp. InsertOrder Procedure 3: Write a procedure that will allow a specified color in the inventory table to be changed to a different color (Hint: you will use the UPDATE command). This procedure will be passed two values: the old color and the new color. Test the procedure by changing the color 'Coral' to the color Pink'. Name the procedure sp. UpdateColor Procedure 4 Write a procedure that will allow a user to cancel an order. The procedure will be passed an order id and the necessary information will be deleted to cancel the order. Name the procedure sp. CancelOrder, Procedure 5: Write a procedure that will calculate the total for a specified order id. The procedure will receive one input parameter (order id) and return one parameter (order total). Name the procedure sp CalcOrder Total. Trigger 1: Create a trigger that will automatically create a shipping record if an inventory item is update with a quantity, on hand
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started