Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HOW TO FIND NEXT RECORD VALUE IN CURSOR

781692Jul 19 2010 — edited Jul 19 2010
hi all,
i am writing some content tot he text file using cursor select statement. i want to know next cursor value. is its possible find out the next value in cursor? if yes then please help me.

for ex i have a cursor like:cursor c1 is select col1,col2
from table
where condition;

open c1(x);
fetch c1 into a,b;
exit when c1%notfound;
text_io.putline(output,a);
before writing second value into the text file i want to check with next value if next value is not equal to current value then only i should write into the text.
is its possible to checking i am checking here but its printing for the current record value only.

please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2010
Added on Jul 19 2010
15 comments
11,921 views