Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Module 4 assignment provides practice with SQL statements for data integration. A file in the same website item contains table definitions for the problems.
The Module assignment provides practice with SQL statements for data integration. A file in the same website item contains table definitions for the problems. Problems to involve Oracle SQL for the MERGE and multiple table INSERT statements. Problems to involve the INSERT ON CONFLICT statement for PostgreSQL. You are encouraged to use both DBMSs to complete the assignment. If you only have one DBMS installed, you should provide your best solution without execution for statements using the other DBMS
Write an Oracle SQL MERGE statement to combine the SSItem dimension table and the SSItemChanges change table. The associated document contains CREATE TABLE and INSERT statements for both tables. Each matching row of SSItemChanges contains values for both modified and nonmodified columns.
Write an Oracle SQL MERGE statement to combine the SSItem dimension table and the SSItemChanges change table. The associated document contains CREATE TABLE and INSERT statements for both tables. Each matching row of SSItemChanges contains new values for modified columns and null values for nonmodified columns.
Write an Oracle SQL INSERT ALL statement to insert rows of the ProductSale table into four tables ProductSales ProductSales ProductSales and ProductSales The associated document contains CREATE TABLE and INSERT statements for all tables. Note that the target tables lack the SalesYear column. If SalesYear equals insert a row into ProductSales The comparisons for the other tables only differ on the SalesYear value and suffix in the name of the target table. You should compute the SalesAmt column in each target table as the sum of the quarter sales Qtr Qtr Qtr and Qtr in the corresponding row of the ProductSale table.
On Problem is the number of the rows in the target tables the same when using INSERT FIRST versus INSERT ALL? Justify your answer by writing and executing an INSERT FIRST statement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started