Query while trying to join tables
I have to join 4 tables(T1-T4) to get some 'n' rows of data in say 3 columns. I am able to do it. In addition to this I need to populate each of these n rows, 3 columns with 2 additional columns from a different table(T7), which is related to only one of the 6 tables say(T3).
select T1.X, T2.Y, T4.z from T1, T2, T3, T4
where T1.C1=T2.P1 and T3.C1=T2.C1 and T1.P1=T4.X1 and T4.Y='abc';
OUTPUT1:
T1.X T2.Y T4.Z
---- ---- ----
1111 str1 val2