Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
