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]
3 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]3 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
Develop a simple game that teaches kindergartners how to add single-digit numbers. Your function game() will take an integer n a
Lyrx [107]

Answer:

2 correct answer out of 3

5 0
3 years ago
Which of the following is NOT a popular computer programming
cestrela7 [59]
Answer is Xero. All the other Languages are Popular and Widely Used.
Thank You!
6 0
3 years ago
Make a list of any four computer that were used in the history of computer.​
blondinia [14]

Answer:

ENIAC, UNIVAC, EDVAC and IMB 1401 are the list of computers used in history of computer

Explanation:

hope it helps

plz make it brainliest ans

7 0
3 years ago
Which two graphs best represent the motion of an object falling freely?
larisa [96]
The graph would have to be pointing completely down to be falling freely.
4 0
3 years ago
Which rule should be followed to stay safe online?
anyanavicka [17]

Answer:

Avoid sharing photos with anyone online.

Explanation:

People can track you down. Its not worth to be kidnapped. Stay safe.

4 0
3 years ago
Other questions:
  • Why are variables useful in programming?
    12·2 answers
  • Jose wants to be sure maintains a high credit score as he is planning yo buy a new car soon what should he do to ensure his scor
    13·2 answers
  • X = 0
    15·1 answer
  • In 3-5 sentences, describe how you would insert a graph in your word-processing document.
    13·1 answer
  • A popular encryption method used to protect data that travel over a wireless network is ___
    15·1 answer
  • Your bluetooth headset is waiting for another bluetooth device to locate its signal. what is this mode known as?'
    8·1 answer
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • Able to make a survey form using VB (Visual basics 6.0) to represent ways of conservation of
    8·2 answers
  • Which term describes a visual object such as a picture, a table, or a text box?
    14·2 answers
  • Pls help! for computers edge 2021
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!