1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
uysha [10]
2 years ago
8

Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo

ice number as a parameter. The INV_SUBTOTAL is the sum of the LINE_TOTAL amounts for the invoice, the INV_TAX is the product of the INV_SUBTOTAL and the tax rate (8 percent), and the INV_TOTAL is the sum of the INV_SUBTOTAL and the INV_TAX.
Computers and Technology
1 answer:
vova2212 [387]2 years ago
7 0

Answer:

The procedure in SQL is created as follows

Explanation:

--creating the procedure

CREATE OR REPLACE PROCEDURE prc_inv_amounts (W_IN IN NUMBER)

AS

--defining variables

W_CK NUMBER := 0;

W_SUBT NUMBER := 0;

W_TAX NUMBER := 0;

BEGIN

--Authentication process of the invoice

SELECT COUNT(*) INTO W_CK FROM INVOICE WHERE INV_NUMBER := W_IN;

--Transaction confirmation

IF W_CK = 1 THEN

SELECT SUM(LINE_TOTAL) INTO W_SUBT FROM LINE

WHERE

--checking the invoice for the desired invoice number

LINE.INV_NUMBER = W_IN;

W_TAX :=W_SUBT * 0.08;

--updating the invoice

UPDATE INVOICE

--setting the new values

SET INV_SUBTOTAL = W_SUBT,

INV_TAX = W_TAX,

INV_TOTAL =W_SUBT + W_TAX

WHERE INV_NUMBER = W_IN;

--ending the if statement

END IF;

--ending the procedure

END;

You might be interested in
Why would a store owner want to calculate a mean
chubhunter [2.5K]

Answer:

a store owner would calculate a mean to see the how much a person spends

Explanation:

4 0
2 years ago
MODS ONLY answer this, I have something for you. I'm reporting this to make it easier
aliya0001 [1]

Answer:

whyyyyy

have  a good day :)

Explanation:

7 0
3 years ago
. Why use a sensitivity analysis?
Natali [406]

Answer:

 Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.  

The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.

It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.

7 0
3 years ago
When solving for K, when cell potential is known, what is one of the first steps to follow?
BaLLatris [955]
Yes it is D like the other person said
5 0
3 years ago
What does NVRAM stand for
Julli [10]
Non-Volatile Random Access Memory
7 0
3 years ago
Read 2 more answers
Other questions:
  • The equipment that processes data in order to create information is called the _______.
    8·2 answers
  • Which is the correct formula to add the values in cells A1 and B1? A. SUM(A1+B1) B. =SUM(A1+B1) C. =SUMA1+B1 D. A1+B1
    9·2 answers
  • g What field in the IPv4 datagram header can be used to ensure that a packet is forwarded through no more than N routers? When a
    10·1 answer
  • Match each career with the education required for each job
    12·1 answer
  • How does form get its power natural gas
    14·1 answer
  • Kevin needs to get his data from a database into a text file to send to another group. He needs to _____.
    12·2 answers
  • Write a program that outputs inflation rates for two successive years and whether the inflation is increasing or decreasing. Ask
    9·1 answer
  • Free brainliest!?! <3​
    9·2 answers
  • What are some good digital habits?
    5·2 answers
  • Explain Http and Ftp​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!