The Car Maintenance team wants to add Tire Change (ID: 1) maintenance task for all cars with the due date of 1 September, 2020. However, the team also wants to know chat if an error occurs the updates will rollback to their previous state. Create a script or them to first add all tasks and then rollback the changes.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter7: Developing An Excel Application
Section: Chapter Questions
Problem 3RA
icon
Related questions
Question

Database Question  using SQL 

Task 2:
The Car Maintenance team wants to add Tire Change (ID: 1) maintenance task for all
cars with the due date of 1 September, 2020. However, the team also wants to know
that if an error occurs the updates will rollback to their previous state. Create a script
for them to first add all tasks and then rollback the changes.
Task
Add a tire change maintenance task for every car and rollback the changes.
<>
Transcribed Image Text:Task 2: The Car Maintenance team wants to add Tire Change (ID: 1) maintenance task for all cars with the due date of 1 September, 2020. However, the team also wants to know that if an error occurs the updates will rollback to their previous state. Create a script for them to first add all tasks and then rollback the changes. Task Add a tire change maintenance task for every car and rollback the changes. <>
Expected Results
CAR_ID
MAINTENANCE_TYPE_ID
MAINTENANCE_DUE
1001
1
2020-09-01
1001
2020-12-31
1002
2020-09-01
1003
1
2020-09-01
1004
1
2020-09-01
1001
2
2020-06-01
1003
2
2020-06-01
Transcribed Image Text:Expected Results CAR_ID MAINTENANCE_TYPE_ID MAINTENANCE_DUE 1001 1 2020-09-01 1001 2020-12-31 1002 2020-09-01 1003 1 2020-09-01 1004 1 2020-09-01 1001 2 2020-06-01 1003 2 2020-06-01
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

This doesn't have the rollback or insert it into the maintenances table

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

You are assigned as the database administrator to collect and manage transactional data of the InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams.

Car Maintenance team wants to add new maintenance tasks to the MAINTENANCES table which was created in Chapter 8, Activity 1. However, the team also wants to insert the tasks in a batch into the database. In other words, they want to insert the rows all together without inserting one-by-one. Therefore, you will need to create a script to add the following tasks and ensure that they are added together:

  • Car ID: 1001, Maintenance Type: 2, Due: 2020-06-01
  • Car ID: 1003, Maintenance Type: 2, Due: 2020-06-01
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Database Functions
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,