0% found this document useful (0 votes)
11 views

Data Joins With Multiple Fields

Uploaded by

K H
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Data Joins With Multiple Fields

Uploaded by

K H
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TABLE - A TABLE - B

Store Order # Customer Store Order # Item


North OO1 Mohan North OO1 Laptop
North OO2 James North OO1 Mouse
South OO1 Sumit North OO2 Monitor
South OO1 Camera

Left Outer Join (A-Order# and B-Order #)

TABLE - A TABLE - B
First Case Store Order # Customer Store Order # Item
North OO1 Mohan North OO1 Laptop
North OO2 James North OO1 Mouse
South OO1 Sumit North OO2 Monitor
South OO1 Camera

TABLE - A TABLE - B
Second case Store Order # Customer Store Order # Item
North OO1 Mohan North OO1 Laptop
North OO2 James North OO1 Mouse
South OO1 Sumit North OO2 Monitor
South OO1 Camera

TABLE - A TABLE - B
Third Case Store Order # Customer Store Order # Item
North OO1 Mohan North OO1 Laptop
North OO2 James North OO1 Mouse
South OO1 Sumit North OO2 Monitor
South OO1 Camera
LE - B
Sales
$ 2,000.00
$ 1,200.00
$ 4,000.00
$ 3,500.00

LE - B
Sales
$ 2,000.00
$ 1,200.00
Error in Final Table
$ 4,000.00
$ 3,500.00

Final Table after Left Outer Join


LE - B Store Order # Customer Store Order # Item Sales
Sales North OO1 Mohan North OO1 Laptop $ 2,000.00
$ 2,000.00 North OO1 Mohan North OO1 Mouse $ 1,200.00
$ 1,200.00 North OO1 Mohan South OO1 Camera $ 3,500.00
$ 4,000.00 North OO2 James North OO2 Monitor $ 4,000.00
$ 3,500.00 South OO1 Sumit North OO1 Laptop $ 2,000.00
South OO1 Sumit North OO1 Mouse $ 1,200.00
South OO1 Sumit South OO1 Camera $ 3,500.00
LE - B
Sales
$ 2,000.00
$ 1,200.00
$ 4,000.00
$ 3,500.00
Table
TABLE - A TABLE - B
Store Order # Customer Store Order # Item Sales
North OO1 Mohan North OO1 Laptop $ 2,000.00
North OO2 James North OO1 Mouse $ 1,200.00
South OO1 Sumit North OO2 Monitor $ 4,000.00
South OO1 Camera $ 3,500.00

Left Outer Join on A.Order # and B.Order #


A. Store and B. Store

TABLE - A TABLE - B
Store Order # Customer Store Order # Item Sales
North OO1 Mohan North OO1 Laptop $ 2,000.00
North OO2 James North OO1 Mouse $ 1,200.00
South OO1 Sumit North OO2 Monitor $ 4,000.00
South OO1 Camera $ 3,500.00
Final table after Left Outer Join

Store Order # Customer Store Order # Item Sales


North OO1 Mohan North OO1 Laptop $ 2,000.00
North OO1 Mohan North OO1 Mouse $ 1,200.00
North OO2 James North OO2 Monitor $ 4,000.00
South OO1 Sumit South OO1 Camera $ 3,500.00

You might also like