Hi. I can use two qureis like below
select A,B,C from ABC
union
select D,E,F from DEF
now my requirement is
i need sum of these values in single query.
TWo queries are from two different and no linlk between ABC and DEF..
but i need sum
Eg. if 1st qry gives 1,2,3
2nd give 4,5,6 by union i get it like
1,2,3
4,5,6
but wat i need is 5,7,9 .Can u???
SreekanthPosted Apr 22, 2009, 2:06 AM
i got the resukt by following query
select sum(TAB.a),sum(TAB.b),sum(TAB.c) from (select a,b,c from ABC union select a,b,c from DEF) as TAB
any other method????