Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Self-Join combined with Outer Join?
r13l24r2_at_gmail.com wrote:
> I guess this is probably a simple problem, but I can't for the life of
> me figure it out. Say I have the following table:
>
> job_id batch_id action date
> ------------ ------------- ------------- --------
> 1 1 sent 1/1/01
> 2 1 received 1/2/01
> 3 2 sent 1/3/01
> 4 2 received 1/4/01
> 5 3 sent 1/5/01
>
>
> I want to write a query that will display as follows:
>
> batch_id sent received
> ------------ ------------ ------------
> 1 1/1/01 1/2/01
> 2 1/3/01 1/4/01
> 3 1/5/01
>
> I can self-join the table so that it gives me a query displaying
> batch_id 1 and 2 no problem. I just can't make it display rows for
> which there is no received action.
>
> Any thoughts?? I'm desperate!!
>
SELF OUTER JOIN.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Aug 01 2006 - 10:49:09 CDT
![]() |
![]() |