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

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top