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
For a certain company, the cost function for producing x items is C(x)=50x+100 and the revenue function for selling x items is R
solmaris [256]

Assuming that this company sells all that it produces, the profit function would be given by P(x) = -0.5(x - 100)² + 5,000 - 50x - 100.

<h3>What is profit?</h3>

In Economics, profit can be defined as a measure of the amount of money (revenue) that is generated when the selling price is deducted from the cost price of a good or service, which is usually provided by producers.

This ultimately implies that, all producers generally work to maximize their profits and make them as large as possible, in order to enable them break even and successful.

Mathematically, the profit function P(x) of a business firm simply refers to the revenue function R(x) minus the cost function C(x):

P(x) = R(x) - C(x)

Where:

  • R(x) represents how much it takes in.
  • C(x) represents how much it spends.

Substituting the given parameters into the formula, we have;

P(x) = -0.5(x - 100)² + 5,000 - (50x + 100)

P(x) = -0.5(x - 100)² + 5,000 - 50x - 100

Read more on maximized profit here: brainly.com/question/13800671

#SPJ1

7 0
2 years ago
Who would use a CLI? (Command Line Interface)
JulijaS [17]
CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users.
7 0
3 years ago
According to your textbook, which of the following is a consequence of the quick development of new technologies in the digital
kramer

Answer:

E. Traditional leaders in communication have lost some control over information                                                              

Explanation:

Due to the quick development of new technologies like Internet, cable etc, traditional leaders in communication have lost some of their control over information. This means that the technological advancement is disruptive for traditional leaders. Following examples are given to elaborate the consequences of advancement in new technology in digital era.

With the establishment of new channels like CNN, Fox News and internet bloggers, the old television network news shows like ABC, NBC lost their audiences.

Email technology has taken on some of the postal service's responsibilities and outperforms attempts to control communication outside national borders. This replaced the postal mail which used to take months to reach the destination.

The Internet and social media websites are transforming the way in which we access and interact with media culture. Before internet most people would watch popular TV shows in  at the time they originally aired it. This  scheduling gave common media interactions at specific times within our society. We still watch these TV shows but now we watch them at our own ease through websites. Using You tube we can upload our own media instead of viewing mainstream television.

8 0
3 years ago
Help me pleseeeeee i will mark u as brainliest
Dovator [93]

Answer:

<!DOCTYPE html>

<html>

 <head>

 <style>

 #header {  

   text-align: center;

   float: left;

 }

 #langtable {

   border: 2px solid blue;

   border-spacing: 5px;

 }

 #langtable th {

     border: 2px solid green;

 }

 #langtable td {

     border: 2px solid green;

     padding: 10px;

 }

 </style>

 </head>

 <body>

   <div id="header">State and languages

   <table id="langtable">

     <tr>  

       <th>State</th>

       <th>Major Spoken Language</th>

     </tr>

     <tr>

       <td>Punjab</td>

       <td>Punjabi</td>

     </tr>

     <tr>

       <td>Jammu and Kashmir</td>

       <td>Kashmiri</td>

     </tr>

     <tr>

       <td>West Bengal</td>

       <td>Bengali</td>

     </tr>

   </table>

   </div>

 </body>

</html>

Explanation:

I think this looks pretty much like it.

7 0
3 years ago
Double clicking the top right corner of a document will
Novosadov [1.4K]

Answer:

open the header. hope this helps

8 0
2 years ago
Other questions:
  • What formatting option is easiest to read when printed out
    12·1 answer
  • An identifying value called a/an ____ is assigned by the java runtime to an object when it is created, to allow the java runtime
    14·1 answer
  • What is a central location that houses Joint Information System (JIS) operations and where public information staff perform publ
    6·1 answer
  • PLEASE HELP! I'm offering brainliest!
    6·1 answer
  • Queremos conectar una pila de 4,5 V a un diodo LED cuya tensión de trabajo es de 2 V. Calcula cuál debe ser el valor de la resis
    8·1 answer
  • 2.
    11·1 answer
  • Hey guys, I don’t have a problem for you but If anyone knows do you still pass your grade level if you failed 1 class in the las
    11·2 answers
  • Which of the following statements are true concerning abstraction and refinement? Select 3 options:
    14·1 answer
  • Hello,
    13·1 answer
  • When a computer is infected by a virus, _______.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!