I have (several tables say) 4 tables, A, B, C and D and they are linked by some common values like:
TableA(A1,A2,A3,A4) ---> TableB(A1,B2,B3,B4) ---> TableC(C1,C2,B3,C4) ---> TableD(D1,D2,D3,C4)
| |
TableX(X1,B2,X3,X4) TableY(Y1,Y2,Y3,C4)
For each unique value of A2
, there is a value A1
. Same Value A1
is there in TableB
.
Similarly in TableB
, for each value of A1
, there are some particular values B2,B3,B4
,
In the same way in TableC
and TableD
also, for each value of B3
and C4
respectively there are particular remaining values.
In addition to the linear flow there are multiple flows inbetween (like from TableB to TableX or TableC to TableY)
I want to extract some columns say for instance A1,A2,B2,C1,D1
and C4
if I am given a value of A2
.
I am new to this type of queries and short of time to complete the task.
Thanks in advance for the help.