Below is the Data format
Table 1 | | Table 2 | Camry_Id | Month | Year | Dealer | Camry_Comments | | Corolla_Id | Month | Year | Dealer | Corolla_Comments | 1 | 7 | 2013 | Hendrick | Camry Comment 1 | | 1 | 7 | 2013 | AutoCity | Corolla Comment 1 | 2 | 7 | 2013 | Hendrick | Camry Comment 2 | | 2 | 7 | 2013 | AutoCity | Corolla Comment 2 | 3 | 7 | 2013 | Hendrick | Camry Comment 3 | | 3 | 7 | 2013 | AutoCity | Corolla Comment 6 | 4 | 7 | 2013 | AutoCity | Camry Comment 4 | | 4 | 7 | 2013 | Leith | Corolla Comment 3 | 5 | 7 | 2013 | AutoCity | Camry Comment 5 | | 4 | 7 | 2013 | Leith | Corolla Comment 8 | 6 | 7 | 2013 | Leith | Camry Comment 6 | | 6 | 8 | 2013 | Leith | Corolla Comment 4 | 7 | 8 | 2013 | Leith | Camry Comment 8 | | 8 | 7 | 2013 | Hendrick | Corolla Comment 7 | 8 | 8 | 2013 | Leith | Camry Comment 9 | | |
|
Below is desired result Result | |
Month | Year | Dealer | Camry_Comments | Corolla_Comments | 7 | 2013 | AutoCity | Camry Comment 4 | Corolla Comment 1 | 7 | 2013 | AutoCity | Camry Comment 5 | Corolla Comment 2 | 7 | 2013 | AutoCity | Corolla Comment 7 | 7 | 2013 | Hendrick | Camry Comment 1 | Corolla Comment 7 | 7 | 2013 | Hendrick | Camry Comment 2 | 7 | 2013 | Hendrick | Camry Comment 3 | 7 | 2013 | Leith | Camry Comment 6 | 7 | 2013 | Leith | Corolla Comment 8 | 8 | 2013 | Leith | Camry Comment 8 | Corolla Comment 4 | 8 | 2013 | Leith | Camry Comment 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Essentially I want to join on month, year and Dealer and display comments in each column aligned. So
if there are comments from both then show both on same like
If one has 2 and other has 1 show first ones on same line; second on next line.Hide duplicates.
It has to show all records(full outer join) from both tables with not multiply or duplicates on either comments column