Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: QUERY HELP
One
way to do this is in the procedure, use variables that hold the previous values
(e.g. last_rnum := rnum). Then, do your comparison of your current value to your
last stored value (e.g. if rnum - last_rnum >1 then flag='*'). I am sure
there are more than one way to skin a cat on this one--but, I do this for some
processing, and it works fine.
<SPAN
class=925285012-26062001>
<SPAN
class=925285012-26062001>lc
<FONT face=Tahoma
size=2>-----Original Message-----From: root_at_fatcity.com
[mailto:root_at_fatcity.com]On Behalf Of Nirmal Kumar Muthu
KumaranSent: Tuesday, June 26, 2001 9:01 AMTo: Multiple
recipients of list ORACLE-LSubject: 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=Arialsize=2>1 7369
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 - 07:42:33 CDT