Solved

Export an oracle table to csv on a jsp page

Posted on 2010-09-13
4
640 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

808 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