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
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

Enrolment was split - SQL Example shows how relvars IS_CALLED and IS_ENROLLED_ON can be derived from the original ENROLMENT relvar, using projection in the initial assignment

Transaction Control The Oracle is transaction oriented; that is, Oracle uses the transactions to make sure the data integrity. The transaction is a sequence of SQL data manip

%ROWCOUNT The %ROWCOUNT yields the number of rows affected by the INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement. The %ROWCOUNT yields zero when a

Predicate - SQL Consider the declarative sentence-a proposition-that is used to introduce this topic:  "Student S1, named Anne, is enrolled on course C1." Recall that th

Procedures   The procedure is a subprogram which performs a specific action. You write procedures using the syntax as shown below: PROCEDURE name [(parameter[, parameter, .

Semidifference via NOT IN and a subquery SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' AND StudentId NOT IN (SELECT StudentId FROM IS_ENROLLED_ON WHER

#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..

Remote Operations: As the illustration shows below, the PL/SQL subprograms can execute the dynamic SQL statements which refer to the objects on a remote database: PROCEDURE

This task involves developing some functions that extract data from an SQL database. The scenario is that a company which owns an online vehicle search website wants to generate so