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: Daemen, Remco <R.Daemen_at_facent.nl>
Date: Tue, 26 Jun 2001 07:36:47 -0700
Message-ID: <F001.0033842B.20010626074725@fatcity.com>

Do you
want a query to return the missing numbers, or do you want a query to return the records AFTER some numbers have been skipped ?
<SPAN

class=368243714-26062001> 
The
first can be done in pl/sql (loop with counter compared to rownum), the latter in sql (use "where not exists ...").
<SPAN

class=368243714-26062001> 
<SPAN

class=368243714-26062001>HTH,  Remco

  <FONT face=Tahoma
  size=2>-----Oorspronkelijk bericht-----Van: Nirmal Kumar Muthu   Kumaran [mailto:NIRMALK_at_qtel.com.qa]Verzonden: dinsdag 26 juni 2001   15:01Aan: Multiple recipients of list ORACLE-LOnderwerp:   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 <FONT face=Arial

  size=2>---------------------------------- <FONT face=Arial 
  size=2>1       7369   
  SMITH 2      
  7499    ALLEN <FONT face=Arial
  size=2>3       7521   
  WARD 4      
  7566    JONES <FONT face=Arial
  size=2>7       7782   
  CLARK 8      
  7788    SCOTT <FONT face=Arial
  size=2>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, <FONT
  face=Arial size=2>How can i refer the previous row detail(s), when oracle   fetchs the current row details?.
  Thanks in adv.
  REgards, <FONT face=Arial
  size=2>Nirmal. Received on Tue Jun 26 2001 - 09:36:47 CDT

Original text of this message

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