Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Outer Join confusion
My brain is shot. Can anyone assist me with building this query? I
have 4 queries right now building 4 result sets, essentially:
select typename from typelookup
select typename, sum(decode(amount,0,planned_amount,amount)) as
statussummary
from item
where status = 1
select typename, sum(decode(amount,0,planned_amount,amount)) as
statussummary
from item
where status = 4
select typename, sum(decode(amount,0,planned_amount,amount)) as
statussummary
from item
where status in (1,4)
I'd like to have a single result set with all the typenames, and the summary values for each status and both statuses, but for some reason I can't figure out the correct outer join syntax. Can anyone help out? Four queries like this are not useful.
The names have been changed to protect the innocent.
Don Received on Tue Oct 25 2005 - 15:57:32 CDT
![]() |
![]() |