Solved

Export an oracle table to csv on a jsp page

Posted on 2010-09-13
4
627 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 26

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now