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
The computer stores a program while the program is running, as well as the data thatthe program is working with, in _____.
kenny6666 [7]

hard drive is wht the awnser is

8 0
3 years ago
5 of 10
DaniilM [7]

Answer:

what

Explanation:

3 0
3 years ago
Is a three-prong grounding plug with the third pong broken-off safe to use.
ad-work [718]
What is the answer choices dude
8 0
3 years ago
What are the contents of memory locations 200, 201, 202, and 203 if the word 1234 is stored at offset 200 and the word 5678 is s
Igoryamba

Answer:

Data at the following addresses will be as following:-

200 :- 34

201 :- 12

202 :- 78

203 :- 56

Explanation:

If there is 1 byte storage.

if the data is of 4 digits.Then we have to store it in 2 memory locations.

The first two digits will be stored at the higher byte address that is 201 and the last two digits will be stored at then lower byte address that is 200.

The case is same with the next data 5678.

At address 202 :- 78 will be stored and at address 203 :- 56 will be stored.

3 0
3 years ago
If i wanted to change my phones simcard, does anything need transferring, or is it an easy swap?
igomit [66]
Most likely not but I think you’ll have to log in your account like if you have an Apple phone . You’ll have to log into your Apple ID
7 0
4 years ago
Other questions:
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • "Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag
    11·1 answer
  • You asked your colleague to provide feedback on a blog post you recently wrote. When they sent you their feedback, they made edi
    10·1 answer
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • The response from a Google Form can be seen in how many ways?
    10·1 answer
  • Write a program that inputs a five-digit integer, spearates the integer into its digits and prints them seperated by three space
    6·1 answer
  • List of rules for expert systems​
    6·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • The Python language uses a compiler which is a program that both translates and executes the instructions in a high-level langua
    15·1 answer
  • What best determines whether a borrower's interest rate on an adjustable rato loan goes up or down?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!