Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export an oracle table to csv on a jsp page

Posted on 2010-09-13
4
Medium Priority
?
671 Views
Last Modified: 2013-12-19
Either using Servlets or JSP, how would I make an HTML link on my jsp page that would allow the user to download a table inside of Oracle as a CSV?
Thanks.
0
Comment
Question by:indsupport
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ravindran_eee
ID: 33664118
I do not know much about JSP. But your requirement can be met with an Oracle stored procedure. Check the below link for implementation of the stored procedure

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:88212348059

You can provide link to the generated CSV file in your HTML file. The stored procedure can be executed on batch everyday (oracle jobs maybe) or execute on-demand basis (like button press)

Hope this helps!
0
 

Author Comment

by:indsupport
ID: 33665865
Funny you should like to that post.  I'm already using that stored procedure to export to a local file.  I don't want to use the local file system, however.  I want to have everything directed to stdout.  Similar to how it is done using PHP with mysql:

http://snipplr.com/view/2234/export-mysql-query-results-to-csv/
0
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 2000 total points
ID: 33668308
The same process works for JSP.  See these questions asked and answered on EE about returning csv files in a JSP:
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_22127947.html
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_25029853.html

You have a lot of open questions -- it would be great if you went through and awarded points to the experts who have helped you.
0
 

Author Comment

by:indsupport
ID: 33782956
Still researching, will let you know -
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question