Create CSV file from resultset in Java

S

simon_s_li

Hi,

I need to be able to read data from a table (ResultSet) and create a
CSV file.

Once the CSV file is created I want to save the CSV into a SQL Server
database.

Can anyone help me with this.

Any sample code would be great.

Regards
Simon
 
J

JK

Hi,

Resultset cannot be saved directly as it is. It has to be read and
store in a Array or Collection. This Array has to be stored as CSV
file.

If requirement is data transfer from one database to another database,
ex. oracle to SQL Server, it is better to go for Hibernate.

Shrik's
 
M

Martin Gregorie

JK said:
Hi,

Resultset cannot be saved directly as it is. It has to be read and
store in a Array or Collection. This Array has to be stored as CSV
file.

If requirement is data transfer from one database to another database,
ex. oracle to SQL Server, it is better to go for Hibernate.
Might be better yet to avoid programming and do the job with the
database unloader and loader programs, which generally write and read
CSV files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top