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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: QUERY HELP

RE: QUERY HELP

From: Koivu, Lisa <lisa.koivu_at_efairfield.com>
Date: Tue, 26 Jun 2001 06:03:19 -0700
Message-ID: <F001.00337F84.20010626053540@fatcity.com>

Have you tried this:

select tab2.col1, tab2.col2, x.col1, x.col2 from
        (select column1 col1,
                column2 col2
        from    tab2
        where   ( your independent conditions here, can't refer to outer query here)
        ) x,

tab2
where x.col1 = tab2.col1  [etc...]

Is that what you are looking for? 
HTH Lisa Koivu
Clumsy Ninja-ette
Ft. Lauderdale, FL, USA

-----Original Message-----

From:   Nirmal Kumar  Muthu Kumaran [SMTP:NIRMALK_at_qtel.com.qa]
Sent:   Tuesday, June 26, 2001 9:01 AM
To:     Multiple recipients of list ORACLE-L
Subject:        QUERY HELP

Dear Guru's,

How can i refer the previous record detail(s), when oracle fetchs the current row details?.

sql> SELECT rownum rnum, empno eno, ename FROM EMP;

RNUM    ENO     ENAME


1       7369    SMITH
2       7499    ALLEN
3       7521    WARD
4       7566    JONES
7       7782    CLARK
8       7788    SCOTT

10      7844    TURNER In the above, can i able to put * mark in record 7 and 10, since before these two records, some records are missing.

Is this possible to do this by query. I need this in reports.

Basically my question is,
How can i refer the previous row detail(s), when oracle fetchs the current row details?.

Thanks in adv.

REgards,
Nirmal. Received on Tue Jun 26 2001 - 08:03:19 CDT

Original text of this message

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