Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer join with each record

Re: Outer join with each record

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Fri, 01 Sep 2006 15:58:31 +0200
Message-ID: <4lqsk7F3998cU1@individual.net>


On 01.09.2006 15:04, aishwan_at_gmail.com wrote:
> hi
>
> i want to show each outer join with each records.
>
> SQL> SELECT D.DEPTNO,E.ENAME
> 2 FROM EMP E,DEPT D
> 3 WHERE D.DEPTNO=E.DEPTNO(+);
>
> DEPTNO ENAME
> --------- ----------
> 10 CLARK
> 10 KING
> 10 MILLER
> 20 SMITH
> 20 ADAMS
> 20 FORD
> 20 SCOTT
> 20 JONES
> 30 ALLEN
> 30 BLAKE
> 30 MARTIN
> 30 JAMES
> 30 TURNER
> 30 WARD
> 40
> 50
>
> 17 rows selected.
>
> But i want
>
> DEPTNO ENAME
> --------- ----------
> 10 CLARK
> 20 CLARK
> 30 CLARK
> 40 CLARK
> 50 CLARK
> 10 KING
> 20 KING
> 30 KING
> 40 KING
> 50 KING
> 10 MILLER
> 20 MILLER
> 30 MILLER
> 40 MILLER
> 50 MILLER
> .
> .
> .
> so on for each employ record with outer join
>
> please help it is not homework.

Where is the problem? AFAIK you just need to add an ORDER clause.

        robert Received on Fri Sep 01 2006 - 08:58:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US