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!

Counting rows in a loop

567571Mar 17 2007 — edited Mar 20 2007
Hi,
I am trying to learn pl/sql and I need some help, please.
I have written a package with a cursor and a loop, which returns a file with some lines.
The last step I have to do is to write something that returns the number of lines produced in the file: i.e, if the loop retuns 356 lines, I have to write something that calculates that figure and returns the result in the last line.

I was told that I need to create a variable and place it somewhere at this point to do the calculation:

END LOOP;

Utl_File.Put(l_Output, 'end of file');

Utl_File.Fclose(l_Output);

I do not quite understand what to do or how to do it, can someone help?
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2007
Added on Mar 17 2007
10 comments
3,361 views