Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Left Outer Join question
My query looks like:
select a.type_id, sum(cost) as summary
from a, b, c, d, e
where a.type_id = e.type_id
and a.id = b.id and a.id = d.id and d.status_id = c.status_id and d.status_id in (1,4) and a.type_id in (1,2,3,4) and a.year = '2006'
(the numeric values are passed into the query)
I need to modify it to select all of the e.type_ids as an outer join.
This query works great:
select e.type_id, sum(cost) as summary
from e, a
where e.type_id = a.type_id (+)
group by e.type_id
but bringing back any of the other joins or FILTERS create an inner join type result. that's right, I add one of the filters to the above query and the outer join stops.
I am stuck in T-SQL and ISO 99 and can't write this as pl-sql. Can anyone help?
I'm running Oracle 9i on windows.
thanks,
Don Received on Thu Feb 16 2006 - 14:20:46 CST