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
Pass the nulls to a dynamic SQL: Passing Nulls: Assume that you want to pass the nulls to a dynamic SQL statement. For illustration, you may write the EXECUTE IMMEDIATE

Keyword &Parameter Description: index_name: This is an undeclared identifier which can be referenced only within the FORALL statement and only as the collection subscript

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it

Indeterminacy in SQL Some SQL expressions are actually not function invocations at all in the mathematical sense, being indeterminate-invocations operating on identical input

Write a stored procedure that accepts the post code in which the customer resides as the input parameter. The procedure should then use an explicit cursor to display comprehensive

Transactions in SQL BEGIN TRANSACTION, COMMIT, and ROLLBACK, SQL has the same syntax except for START in place of BEGIN. However, START TRANSACTION is used only for outermost

Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.

Data Types in SQL - Timestamp TIMESTAMP for values representing points in time on a specified uniform scale. DATE is used for timestamps on a scale of one day, such as DATE '2

Package Body: The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the pac

SQL Is a Database Language: The commands given to a DBMS by an application are written in the database language of the DBMS. The term data sublanguage is sometimes used instea