Create a procedure to tax calculation task, PL-SQL Programming

Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table contains the states that require taxes to be submitted for Internet sales. If the state is not listed in the table, then no tax should be accessed on any order. The shopper's state and basket subtotal are the inputs into the procedure while the tax amount should be returned.

1.  Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is to return the tax amount. Review the contents of the BB_TAX table, which contains the tax rate for each state that needs to be taxed.

2.  Create a host variable named G_TAX to hold the value returned by the procedure.

3.  Invoke the procedure using the values of "VA" for the state and $100 for the subtotal.

4.  Display the tax amount returned by the procedure (it should be $4.5).

Posted Date: 3/12/2013 1:53:19 AM | Location : United States







Related Discussions:- Create a procedure to tax calculation task, Assignment Help, Ask Question on Create a procedure to tax calculation task, Get Answer, Expert's Help, Create a procedure to tax calculation task Discussions

Write discussion on Create a procedure to tax calculation task
Your posts are moderated
Related Questions
Error Handling The PL/SQL makes it easy to detect and process the predefined and user-defined error conditions known as exceptions. Whenever an error occurs, an exception is ra

Cursor Variables As Parameters You can declare the cursor variables as the formal parameters of the functions and procedures. In the illustration below, you define the REF CUR

FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

Oracle 10G new features:- Automatic Database Diagnostic Monitor System Advancements - these methods will provides several methods for extracting reports through the Automatic

Opening a Cursor Opening the cursor executes the query & identifies the result set that consists of all rows that meet the query search criteria. For the cursors declared usin

FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

Keyword and Parameter Description: table_reference: This specifies a table or view that should be accessible when you execute the DELETE statement, and for that you must

Comparison Operators Usually, you use the comparison operators in the WHERE clause of a data manipulation statement to form the predicates, that compare one expression to anot

The SQL ‘CREATE TABLE' scripts for all the tables you have implemented. Note that your tables must correspond exactly to the ERD you have provided in 1. above, or you will lose ma