Question: In your assignment file that you submit, first, place the code needed to create the procedure. After that, skip a few lines and there include
In your assignment file that you submit, first, place the code needed to create the procedure. After that, skip a few lines and there include the anonymous block code to call the procedure
For this problem I want you to include error handling to return a tax amount of 0 if the STATE passed into the procedure is not found in the BB_TAX table. In addition, I'd like you to correct the error that may occur if the user passes in the state in lower case rather than upper case letters
follow these steps to create a procedure for calculating the tax on an order. The BB_TAX table contains states that require submitting taxes for internet sales. If the state isn't in the table, no tax should be assessed in the order. The shopper's state and basket subtotal are the inputs to the procedure, and the tax amount should be returned.
1. In SQL Developer, create a procedure named TAX_COST_SP. Remember that the state and subtotal values are inputs to the procedure, which should return the tax amount. Review the BB_TAX table, which contains the tax rate for each applicable state.
2. Call the procedure with the values VA for the state and $100 for the subtotal. Display the tax amount the procedure returns.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
