I need assistance with the following MySQL question: Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invoice 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. Screenshot attached*
I need assistance with the following MySQL question: Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invoice 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. Screenshot attached*
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
I need assistance with the following MySQL question:
Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invoice 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.
Screenshot attached*
![Database name: Ch08_SaleCo2
Table name: CUSTOMER
CUS CODE CUS_LNAME CUS_FNAME CUS_INITIAL CUS AREACODE CUS_PHONE CUS BALANCE|
Table name: INVOICE
INV_NUMBER CUS_CODE INV_DATE INV_SUBTOTAL INV_TAXNV_TOTAL
10010 Ramas
Alfed
615
844-2573
0.00
1001
10014
16-Jan-18
24.90
1.99
26.89
0.00
345.86
10011 Dunne
Leona
Kathy
Paul
K
713
894-1238
1002
10011
16-Jan-18
9.98
0.80
10.78
10012 Smith
10013 Olowski
615
894-2285
1003
10012
16-Jan-18
153.85
12.31
166.16
F
615
894-2180
536.75
1004
10011
17-Jan-18
34.97
2.80
37.77
10014 Orlande
10015 O'Brian
0.00
0.00
221. 19
760.93
Myron
Amy
615
222-1672
76.08
429.66
B
713
442-3381
1005
10018
17-Jan-18
70.44
5.64
10016 Brown
James
G
615
297-1228
1006
10014
17-Jan-18
397.83
31.83
10017 Will ams
George
615
290-2556
1007
10015
17-Jan-18
34.97
2.80
37.77
10018 Farice
Anne
713
382.7186
216.65
1008
10011
17-Jan-18
399.15
31.93
431.08
10019 Smith
Olete
K
615
297-3809
00
0
Table name: LINE
Table name: PRODUCT
| LINE_UNITS LINE_PRICE|
14.99
INV_NUMBER LINE_NUMBER P_CODE
1 13-02/P2
2 23109 HE
1 54778-21
LINE TOTAL
P_CODE
P_DESCRIPT
P_INDATE P_QOH P_MIN P_PRICE P_DISCOUNT V_CODE
1001
1001
14 99
995
11
9.96
11GER/31 Power painter, 15 psi., 3-nozzle
03-Nov-17
8
5
109.99
00
25595
1002
4.99
998
13-Dec-17
13-Q2P2 7.25-in. pwr. saw blade
14-Q1L3 9.00-in. pwr. saw blade
32
15
14.99
0.05
21344
1003
1 2238/CPD
1
38 95
38 95
13-Nov-17
18
12
17.49
0.00
21344
1003
2 1546-G02
3 13.02/P2
1 54778-2T
2 23109-HB
1
39.95
39 95
74.95
1546-Q02 Hrd. cloth, 14-in., 2x50
15-Jan-18
15
8
39.95
0.00
23119
1003
14.99
1558-GW Hrd. cioth, 1/2-in., 3x50
2232/QTY B&D jigsaw, 12-in. blade
2232/GME B8D jigsaw, 8-in. blade
2238/QPD B&D cordless drill, 1/2-in.
15-Jan-18
23
5
43.99
0.00
23119
1004
3
4.99
14.97
30-Dec-17
8
109.92
0.05
24288
1004
2
9.96
19 90
24-Dec-17
6
99.87
0.05
24288
1005
1 PVC23DRT
12
5.67
70.44
1 SM-18277
2 2232/OTY
3 23109-HO
4 89 WRE-Q
1 13-C2/P2
2 54778-2T
1 PVC23DRT
20-Jan-18
12
5
38.95
0.05
25595
1005
3
6.99
20.97
109 92
995
256 99
29 98
4.99
29 35
359 85
9 95
9.95
1006
109.90
23109-HB Claw hammer
20-Jan-18
23
10
0.10
21225
1
1005
1005
1
9.55
256.99
23114-AA Sledge hammer, 12 lb.
02-Jan-18
8
5
14.40
0.05
1
54778-2T Rat-tail file, 1/8-in. fine
15-Dec-17
43
20
4.99
0.00
21344
1007
2
14.99
89-WRE-Q Hicut chain saw, 16 in.
07-Feb-18
20-Feb-18
11
256.99
0.05
24288
11
1007
1009
4 99
PVC23DRT PVC pipe, 3.5-in., 8-ft
188
75
5.87
0.00
5
5.67
SM-18277 1.25-in. metal screw, 25
01-Mar-18
172
75
6.99
0.00
21225
1008
2 WRB/TT3
3
119.96
SW-23116 2.5-in. wd. screw, 50
24-Feb-18
237
100
8.45
0.00
21231
3 23103- HB
1008
1
WR3/TT3 Steel matting, 4'x8x1/6", 5" mesh
17-Jan-18
18
5
119.95
0.10
25595
Table name: VENDOR
V CODE V_NAME
21225 Bryson, Inc.
21226 SuperLoo, Inc.
21231 D&E Supply
21344 Gomez Bros.
22567 Dome Supply
23119 Randset s Lid.
| V_CONTACT | V AREACODE V_PHONE V_STATE V_CRDER
Smithson
615
223-3234
TN
Flushing
Singh
Crtega
904
215-8996
FL
N
615
228-3245
TN
615
889-2546
KY
Smith
901
678-1419
GA
N
Anderson
901
67B-398
GA
24004 Brackman Bros
815
Browning
Hakford
Smith
228-1410
TN
24288 OROVA, Inc.
26443 B&K, Ine
615
898-1234
TN
C04
227-00eG
FL
25501 Damal Supplies
Snythe
615
890-3529
TN
N
25595 Rubicon Systems Crton
904
456-0082
FL
Y](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8d684857-6a55-4301-8b61-1ffedf4ee3a3%2F340d3f01-c861-4467-b879-b5307dad4d22%2Fjbktmh_processed.png&w=3840&q=75)
Transcribed Image Text:Database name: Ch08_SaleCo2
Table name: CUSTOMER
CUS CODE CUS_LNAME CUS_FNAME CUS_INITIAL CUS AREACODE CUS_PHONE CUS BALANCE|
Table name: INVOICE
INV_NUMBER CUS_CODE INV_DATE INV_SUBTOTAL INV_TAXNV_TOTAL
10010 Ramas
Alfed
615
844-2573
0.00
1001
10014
16-Jan-18
24.90
1.99
26.89
0.00
345.86
10011 Dunne
Leona
Kathy
Paul
K
713
894-1238
1002
10011
16-Jan-18
9.98
0.80
10.78
10012 Smith
10013 Olowski
615
894-2285
1003
10012
16-Jan-18
153.85
12.31
166.16
F
615
894-2180
536.75
1004
10011
17-Jan-18
34.97
2.80
37.77
10014 Orlande
10015 O'Brian
0.00
0.00
221. 19
760.93
Myron
Amy
615
222-1672
76.08
429.66
B
713
442-3381
1005
10018
17-Jan-18
70.44
5.64
10016 Brown
James
G
615
297-1228
1006
10014
17-Jan-18
397.83
31.83
10017 Will ams
George
615
290-2556
1007
10015
17-Jan-18
34.97
2.80
37.77
10018 Farice
Anne
713
382.7186
216.65
1008
10011
17-Jan-18
399.15
31.93
431.08
10019 Smith
Olete
K
615
297-3809
00
0
Table name: LINE
Table name: PRODUCT
| LINE_UNITS LINE_PRICE|
14.99
INV_NUMBER LINE_NUMBER P_CODE
1 13-02/P2
2 23109 HE
1 54778-21
LINE TOTAL
P_CODE
P_DESCRIPT
P_INDATE P_QOH P_MIN P_PRICE P_DISCOUNT V_CODE
1001
1001
14 99
995
11
9.96
11GER/31 Power painter, 15 psi., 3-nozzle
03-Nov-17
8
5
109.99
00
25595
1002
4.99
998
13-Dec-17
13-Q2P2 7.25-in. pwr. saw blade
14-Q1L3 9.00-in. pwr. saw blade
32
15
14.99
0.05
21344
1003
1 2238/CPD
1
38 95
38 95
13-Nov-17
18
12
17.49
0.00
21344
1003
2 1546-G02
3 13.02/P2
1 54778-2T
2 23109-HB
1
39.95
39 95
74.95
1546-Q02 Hrd. cloth, 14-in., 2x50
15-Jan-18
15
8
39.95
0.00
23119
1003
14.99
1558-GW Hrd. cioth, 1/2-in., 3x50
2232/QTY B&D jigsaw, 12-in. blade
2232/GME B8D jigsaw, 8-in. blade
2238/QPD B&D cordless drill, 1/2-in.
15-Jan-18
23
5
43.99
0.00
23119
1004
3
4.99
14.97
30-Dec-17
8
109.92
0.05
24288
1004
2
9.96
19 90
24-Dec-17
6
99.87
0.05
24288
1005
1 PVC23DRT
12
5.67
70.44
1 SM-18277
2 2232/OTY
3 23109-HO
4 89 WRE-Q
1 13-C2/P2
2 54778-2T
1 PVC23DRT
20-Jan-18
12
5
38.95
0.05
25595
1005
3
6.99
20.97
109 92
995
256 99
29 98
4.99
29 35
359 85
9 95
9.95
1006
109.90
23109-HB Claw hammer
20-Jan-18
23
10
0.10
21225
1
1005
1005
1
9.55
256.99
23114-AA Sledge hammer, 12 lb.
02-Jan-18
8
5
14.40
0.05
1
54778-2T Rat-tail file, 1/8-in. fine
15-Dec-17
43
20
4.99
0.00
21344
1007
2
14.99
89-WRE-Q Hicut chain saw, 16 in.
07-Feb-18
20-Feb-18
11
256.99
0.05
24288
11
1007
1009
4 99
PVC23DRT PVC pipe, 3.5-in., 8-ft
188
75
5.87
0.00
5
5.67
SM-18277 1.25-in. metal screw, 25
01-Mar-18
172
75
6.99
0.00
21225
1008
2 WRB/TT3
3
119.96
SW-23116 2.5-in. wd. screw, 50
24-Feb-18
237
100
8.45
0.00
21231
3 23103- HB
1008
1
WR3/TT3 Steel matting, 4'x8x1/6", 5" mesh
17-Jan-18
18
5
119.95
0.10
25595
Table name: VENDOR
V CODE V_NAME
21225 Bryson, Inc.
21226 SuperLoo, Inc.
21231 D&E Supply
21344 Gomez Bros.
22567 Dome Supply
23119 Randset s Lid.
| V_CONTACT | V AREACODE V_PHONE V_STATE V_CRDER
Smithson
615
223-3234
TN
Flushing
Singh
Crtega
904
215-8996
FL
N
615
228-3245
TN
615
889-2546
KY
Smith
901
678-1419
GA
N
Anderson
901
67B-398
GA
24004 Brackman Bros
815
Browning
Hakford
Smith
228-1410
TN
24288 OROVA, Inc.
26443 B&K, Ine
615
898-1234
TN
C04
227-00eG
FL
25501 Damal Supplies
Snythe
615
890-3529
TN
N
25595 Rubicon Systems Crton
904
456-0082
FL
Y
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 6 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY