i have a table T1(master) where i agg sum(values) based on enrollid and accumid.
values are
enrollid accumid value
123 212 200
123 213 300
123 214 400
Now i have an other table T2(detail) where i need to join with T1
i need to use master outer join
T2 is as follows
Enrollid B1 B2 B3
123 300 0 0
I have agg the table T2 sum(B1),sum(B2), sum(B3) on Enrollid as key port
then above is the output
Now i need to join T1 and T2 using Master outer join (joiner) and add values of amounts as below
ID Amount1 Amount2 Amount3
123,B1(300+200(value at 212),B2(0)+300
(value at213), B3+
(value at 214)
Below should be the output
Enrollid Amt1 Amt2 Amt3
123 500 300 400 But i am getting out put as
123 500 0 0
123 0 300 0
123 0 0 400
Kindly help me how can we get out put as mentioned above as one single record instead of 3 diff records.
values are
enrollid accumid value
123 212 200
123 213 300
123 214 400
Now i have an other table T2(detail) where i need to join with T1
i need to use master outer join
T2 is as follows
Enrollid B1 B2 B3
123 300 0 0
I have agg the table T2 sum(B1),sum(B2), sum(B3) on Enrollid as key port
then above is the output
Now i need to join T1 and T2 using Master outer join (joiner) and add values of amounts as below
ID Amount1 Amount2 Amount3
123,B1(300+200(value at 212),B2(0)+300
(value at213), B3+
(value at 214)
Below should be the output
Enrollid Amt1 Amt2 Amt3
123 500 300 400 But i am getting out put as
123 500 0 0
123 0 300 0
123 0 0 400
Kindly help me how can we get out put as mentioned above as one single record instead of 3 diff records.