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 view side by side command is used to view and ________ two workbooks at one time
Reil [10]
...to view and edit two...
7 0
3 years ago
Precautionary measures to be observed when using ICT tools​
Dafna11 [192]

Answer:

ICT is the abbreviated form of Information and Communication. It included different technologies like mobile phones, computers, USBs etc.

Following are two precautionary measures which should be observed when using any kind of ICT:

  1. Use of Antivirus: It can used to protect anything placed inside the technology especially from hacking and viruses which can create many issues.
  2. Backup Data: Creating a backup of the data stored in the device is important as it can be recalled when the device malfunctions. Backup of the data can be created through using USBs, CDs etc or through cloud storage
7 0
3 years ago
Five types of conflict in the school​
MrRissso [65]

Answer:

Conflicts can be classified into five different types: structural, value, relationship, interest, and data [

Explanation:

5 0
3 years ago
Read 2 more answers
What are some ways to rename a worksheet? Check all that apply.
Mamont248 [21]

Answer:

Click the Home tab, click Format, click Rename Sheet, type the name, and press Enter

Explanation:

im  not really sure but i think this is the answer

have a good day

3 0
3 years ago
What is the purpose of netiquette guidelines?
sp2606 [1]
The purpose of netiquette guidlelines is to provide a safe and secure environment for internet users everywhere
7 0
3 years ago
Other questions:
  • Why is the stateless nature of the internet a problem for shopping cart software? g?
    5·2 answers
  • Your organization issues devices to employees. These devices generate one-time passwords every 60 seconds. A server hosted withi
    15·1 answer
  • What piece of software tells the operating system how to use a specific hardware device? a. User interface b. System service c.
    14·1 answer
  • A law office has been leasing dark fiber from a local telecommunications company to connect a remote office to company headquart
    14·1 answer
  • A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, A3 contains 7. You enter in cell A4 the followi
    8·1 answer
  • Designing a video game takes tons of creativity. What inspires your personal creativity and ideas for video games? Explain and g
    15·1 answer
  • In this class, it is very common for your computer screen to look like this. What is this?​
    5·1 answer
  • Is it true or false and incomplete doing can be saved in Paint​
    15·1 answer
  • Finish the format string to get the output shown below.<br> Day<br> &gt;&gt;&gt;{ v8'_format('Day)
    5·1 answer
  • Mention and discuss specific professional ethics related to augmented reality, artificial intelligence, and the internet of thin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!