We have two tables.
Tables can be joined with Tab1-> col1 with Tabl2->Col2. I need to get the out put of the data some thing like this
Is this some thing can be done through SQL? We are in DB2 z/OS V9.
Code:
Table1
Col1
1
2
Table2
Col1 Col2
1 1
2 1
3 1
4 1
5 1
1 2
2 2
Code:
Table1 Table2 Table2 Table2 Table2 Table2 Table2
Col1 Col2 Col1 Col1 Col1 Col1 Col1
1 1 1 2 3 4 5
2 2 1 2