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
Object Type: The object type is a user-defined composite datatype which encapsulates a data structure along with the functions and procedures required to manipulate the data

Ending Transactions A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program

Define basic operators of relational algebra with an example each

Using Operator REF: You can retrieve refs by using the operator REF that, like VALUE, takes as its argument a correlation variable. In the illustration below, you retrieve one

THEO R Y OF PANSPERMIA - Arrhenius (1908) postulated the cosmic panspermia theory that claims that organisms existed throughout the universe, and their spores, etc., could

Using FORALL and BULK COLLECT Together You can unite the BULK COLLECT clause with the FORALL statement, in that case, the SQL engine bulk-binds column values incrementally. In

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

UPDATE Statement   The UPDATE statement transforms the values of the specified columns in one or more rows in the table or view. Syntax:

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

Pl/SQL Expressions The Expressions are constructed by using the operands and operators. An operand is a constant, literal, variable, or function call which contributes a value