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!

REF Cursor creating CSV files

748473Mar 18 2010 — edited Nov 14 2011
Hi guys

I am writing a package to create many different CVS files from the database.
I have created a Procedure for each CVS files to be created within the package.
I have defined cursor for each file in each procedure.
Read cursor through and concatenate all fields into a large string of record and write it into the file using UTL_FILE utility.

Is there any way I can create a common procedure and pass cursor_name, file_name as parameter and concatenate all fields and records and write it into the file? I am thinking of using REF cursor but the problem is cursor query is different for each file. Some file has 2 columns and some has 200 columns.
Any idea how to make this working for any format?

Your help will be much appreciated.

Thanks and regards

Vijay
This post has been answered by BluShadow on Mar 18 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2011
Added on Mar 18 2010
10 comments
6,452 views