select a,max(b),c
from ( select * from a
union
select * from b)
group by a,c
order by a
aonther query:
SELECT DECODE(A.COL1, '', B.COL1, A.COL1) "C",
DECODE(A.COL2, '', 0, A.COL2)+DECODE(B.COL2, '', 0, B.COL2) "I",
DECODE(A.COL3, '', B.COL3, A.COL3) "OK"
FROM A FULL OUTER JOIN B ON (A.COL1=B.COL1)
ORDER BY C
Oracle Certified Master - September, 2003, the Second OCM in China
*** LOOKING for PART TIME JOB***
Data Warehouse & Business Intelligence Expert
MCSE, CCNA, SCJP, SCSA from 1998
Oracle Certified Master - September, 2003, the Second OCM in China
*** LOOKING for PART TIME JOB***
Data Warehouse & Business Intelligence Expert
MCSE, CCNA, SCJP, SCSA from 1998
Bookmarks