REF Cursor creating CSV files
748473Mar 18 2010 — edited Nov 14 2011Hi 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