Re: NULL in outer joins?
From: Ian Bainbridge <bainbridge_i_at_perc03_at_bgers.co.uk>
Date: 1995/05/15
Message-ID: <3p851a$5tf_at_atlas.bgers.co.uk>#1/1
select dept.deptno, dname, SUM(nvl(sal,0)) "Monthly Salary" from emp, dept
where emp.deptno(+) = dept.deptno
group by dept.deptno, dname
order by dept.deptno
Date: 1995/05/15
Message-ID: <3p851a$5tf_at_atlas.bgers.co.uk>#1/1
Try
select dept.deptno, dname, SUM(nvl(sal,0)) "Monthly Salary" from emp, dept
where emp.deptno(+) = dept.deptno
group by dept.deptno, dname
order by dept.deptno
-- +--------------------------+-------------------------+-----------------------+Received on Mon May 15 1995 - 00:00:00 CEST
| Ian Bainbridge | bainbridge.i_at_bgers.co.uk|Phone: (44)191-216-0202|
| British Gas ERS | Newcastle Upon Tyne, UK | x2790 |
+--------------------------+-------------------------+-----------------------+