I have a table TableA with 6 columns(col1,col2,col3,col4,col5,col6) and there is an other table TableB with 5 columns (colA, ColB(typeID), ColC, ColD, ColE). I need to fetch the col2 …Col6 from tableA by joining with TableB.
I would have to
- join col2 from TableA with colB from TableB and again
- join col3 from TableA with colB from TableB
- join col4 from TableA with colB from TableB
- join col5 from TableA with colB from TableB
Each of the column from TableA needs to be joined with same column (colB) in TableB.Here the typeid value will be different for each of the col types in TableAe
The colB is a type id and hence col2, col3,col4, col5 are different types, hence they are kind being joined with colb. I need a query which will fetch all the values of col2, col3,col4, col5 and the colc value based on each type in the same query. I tried writing the query. But could not fetch all the values in a single query.I need to fetch the values for all the field in TableA using a single Query.
Any help on this is much appreciated.