This content has been marked as final. Show 2 replies
Better to post it here
Oracle Discussion Forums » Java
I am using Oracle 11g DB
My requirement is that I have to generate a CSV file which has customer details. Each value that is comma separated comes from different set of SQL queries. I want to write a stored procedure along with java code to acieve this. How do I go about it? Should I return multiple cursors from my stored proc and iterate from the java side to create the CSV file? Any other suggestions?
Other suggestions? Yes - don't reinvent the wheel - it has already been created.
1. Tom already wrote such a proc and published it many years ago. See this AskTom thread
2. See BluShadow's link from the '5. How do I read or write an Excel file?' question in the FAQ at the top of the sql and pl/sql forum
SQL and PL/SQL FAQ
3. Use a sql developer query like 'select /*csv*/ * from emp
4. Search the sql and pl/sql forum for csv and use of the many threads that already answer this.