Example:
I want the COL3 replaced with the Select statement form TABLE B as below in my original Select Statement of TABLE A:
Select COL1, COL2, <*COL3*> from TableA;
COL3 => (Select Sum(COL2) from TableB Group by COl1 and order by COL1)
Example:
I want the COL3 replaced with the Select statement form TABLE B as below in my original Select Statement of TABLE A:
Select COL1, COL2, <*COL3*> from TableA;
COL3 => (Select Sum(COL2) from TableB Group by COl1 and order by COL1)
2
Answers
You could try using some subqueries
You can use joins, if you have something common between the two tables.
For example: