Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
bartleby
Concept explainers
Question
Task 8: Create the UPDATE_INVOICE procedure to change the date of the invoice whose number is stored in I_INVOICE_NUM to the date currently found in I_INVOICE_DATE.
Transcribed Image Text:INVOICE_NUM
INVOICE_DATE
CUST_ID
14216
2021年11月15日
125
14219
2021年11月15日
227
14222
2021年11月16日
294
14224
2021年11月16日
182
14228
2021年11月18日
435
14231
2021年11月18日
125
14233
2021年11月18日
435
14237
2021年11月19日
616
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
This is a popular solution
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 2 steps
Still need help?
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Code is incorrect, did not return any results. Screenshot is to prove code doesn't run in mySQL.
Transcribed Image Text:Lab 8-1: KimTay Pet Supplies
Tasks
!!!!
3
Till
CENGAGE MINDTAP
1
Task 8: Create the UPDATE_INVOICE procedure to change the date of the
invoice whose number is stored in I_INVOICE_NUM to the date currently found in
10.00 I_INVOICE_DATE.
0.00
out of
Checks
O out of 1 checks passed. Review the results below for more details.
SQL Database Test Incomplete
Complete task 8
Feedback R
The wrong headers were returned.
Some expected rows were missing (shown in red below).
Test Query R
CALL UPDATE_INVOICE('00001', '2021年11月21日')
SELECT * FROM INVOICES WHERE INVOICE_NUM = '00001'
Expected Results
INVOICE_NUM
00001
Actual Results
No data
INVOICE_DATE
2021年11月21日
CUST ID
294
Task 9: Create the DELETE_INVOICE procedure to delete the invoice whose
Lin T THMATAF MLIM
<
E
FILETREE
~/workspace
query.sql
query2.sql
query.sql
1 DELIMITER //
2
3 CREATE PROCEDURE UPDATE_INVOICE (IN I_INVOICE_NUM INT, I_INVOICE_DATE DATE)
4
5 BEGIN
6
7
8
9
10
11 END//
12
13 DELIMITER ;
14
X query2.sql
x +
UPDATE INVOICES SET INVOICE_DATE= I_INVOICE_DATE
SQL Viewer
WHERE INVOICE_NUM=I_INVOICE_NUM;
X >_ Terminal
+
Query completed
Q Search this course
X
?
A-Z
Solution
Bartleby Expert
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Code is incorrect, did not return any results. Screenshot is to prove code doesn't run in mySQL.
Transcribed Image Text:Lab 8-1: KimTay Pet Supplies
Tasks
!!!!
3
Till
CENGAGE MINDTAP
1
Task 8: Create the UPDATE_INVOICE procedure to change the date of the
invoice whose number is stored in I_INVOICE_NUM to the date currently found in
10.00 I_INVOICE_DATE.
0.00
out of
Checks
O out of 1 checks passed. Review the results below for more details.
SQL Database Test Incomplete
Complete task 8
Feedback R
The wrong headers were returned.
Some expected rows were missing (shown in red below).
Test Query R
CALL UPDATE_INVOICE('00001', '2021年11月21日')
SELECT * FROM INVOICES WHERE INVOICE_NUM = '00001'
Expected Results
INVOICE_NUM
00001
Actual Results
No data
INVOICE_DATE
2021年11月21日
CUST ID
294
Task 9: Create the DELETE_INVOICE procedure to delete the invoice whose
Lin T THMATAF MLIM
<
E
FILETREE
~/workspace
query.sql
query2.sql
query.sql
1 DELIMITER //
2
3 CREATE PROCEDURE UPDATE_INVOICE (IN I_INVOICE_NUM INT, I_INVOICE_DATE DATE)
4
5 BEGIN
6
7
8
9
10
11 END//
12
13 DELIMITER ;
14
X query2.sql
x +
UPDATE INVOICES SET INVOICE_DATE= I_INVOICE_DATE
SQL Viewer
WHERE INVOICE_NUM=I_INVOICE_NUM;
X >_ Terminal
+
Query completed
Q Search this course
X
?
A-Z
Solution
Bartleby Expert
by Bartleby Expert
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Task 5: Create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer whose ID currently is stored in I_CUST_ID. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. When the procedure is called it should output the contents of I_CUSTOMER_NAME and I_CREDIT_LIMIT.arrow_forwardALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY'; /* JOB TABLE */ CREATE TABLE JOB ( JOB_CODE varchar2(3) PRIMARY KEY, JOB_DESCRIPTION varchar2(25), JOB_CHG_HOUR float(8), JOB_LAST_UPDATE date ); INSERT INTO JOB VALUES('500','Programmer', '35.75','11/20/2015'); INSERT INTO JOB VALUES('501','Systems Analyst', '96.75','11/20/2015'); INSERT INTO JOB VALUES('502','Database Designer', '125', '3/24/2016'); INSERT INTO JOB VALUES('503','Electrical Engineer', '84.5', '11/20/2015'); INSERT INTO JOB VALUES('504','Mechanical Engineer', '67.9', '11/20/2015'); INSERT INTO JOB VALUES('505','Civil Engineer', '55.78','11/20/2015'); INSERT INTO JOB VALUES('506','Clerical Support', '26.87','11/20/2016'); INSERT INTO JOB VALUES('507','DSS Analyst', '45.95','11/20/2015'); INSERT INTO JOB VALUES('508','Applications Designer','48.1', '3/24/2016'); INSERT INTO JOB VALUES('509','Bio Technician', '34.55','11/20/2015'); INSERT INTO JOB...arrow_forwardStayWell’s maintenance team wants to recheck the apartments that had plumbing service requests beforehand. You will need to return all the property IDs and the addresses of the properties that had plumbing service request (CATEGORY_NUMBER 1). Task Return a list of all the property IDs and the addresses of the properties that had plumbing service requests.arrow_forward
- Task 12: When deleting a customer, subtract the balance multiplied by the sales rep’s commission rate from the commission for the corresponding sales rep.arrow_forwardTask 8: Create the UPDATE_INVOICE procedure to change the date of the invoice whose number is stored in I_INVOICE_NUM to the date currently found in I_INVOICE_DATE.arrow_forwardI need help with an UPDATE statement that will change the CUST_EMAIL value to "unknown" for records in the CUSTOMERS table that have null values for the cust_email fieldarrow_forward
- Task 9: Create the DELETE_INVOICE procedure to delete the invoice whose number is stored in I_INVOICE_NUM.arrow_forwardEXAMINE THE TRIGGER BELOW IS IT CORRECT? IF NOT MODIFY Create test to show that the triggers are correctly implemented, do the following: Truncate the Transaction table Reset the Tx_Nbr sequence back to 1 Update the Account table, setting the Balance back to zero Re-run the INSERT statements for the transactions Use simple queries to demonstrate that the results in the Transaction and Account tables are as expected GIVEN THE TRIGGER BELOW: Trigger to enforce the referential integrity for the Transaction Ref_Nbr: Deposit or Withdrawal transaction to Bank Branch Bill Payment, Debit Purchase, or Return transaction to Merchant CREATE TRIGGER Transaction_RefNbr_Check BEFORE INSERT OR UPDATE ON Transactions FOR EACH ROW DECLARE TxRefNbr_count INTEGER; BEGIN IF:NEW.TxTypeCode = ‘D’ OR :NEW.TxTypeCode = ‘W’ THEN SELECT COUNT(*)INTO TxRefNbr_count FROM BRANCH WHERE BranchNbr=:NEW.RefNbr; IF TxRefNbr_count = 0 THEN...arrow_forwardpart A Attempt to violate the primary key constraint and observe the result. part B Attempt to violate the foreign key constraint and observe the resultarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education