By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

How to export resultset to CSV

P: n/a
Hi there,
I need to extract huge amount of data from a DB2 dabase periodically.
The extracted data needs to be exported to CSV format. I have thought
of writing a Java piece of code to connect to DB2 using JDBC and then
execute various queries.
Is there any in-built functionality using which I can export the query
resultset to CSV ?

Thanks

Sumukh

Aug 9 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Aug 9, 3:38 am, bab...@gmail.com wrote:
Hi there,
I need to extract huge amount of data from a DB2 dabase periodically.
The extracted data needs to be exported to CSV format. I have thought
of writing a Java piece of code to connect to DB2 using JDBC and then
execute various queries.
Is there any in-built functionality using which I can export the query
resultset to CSV ?

Thanks

Sumukh
The EXPORT command will do what you want to..

Aug 9 '07 #2

P: n/a
There is just one issue though. You are limited to only 254
characters. So, if you have a varchar of length 500, you will lose 256
characters in the export. I dont know if this limitation has been
removed from V9 or not, but I still face it on our V8 FP 14.

Regards,
dotyet

On Aug 9, 10:41 am, Arun Srinivasan <arunro...@gmail.comwrote:
On Aug 9, 3:38 am, bab...@gmail.com wrote:
Hi there,
I need to extract huge amount of data from a DB2 dabase periodically.
The extracted data needs to be exported to CSV format. I have thought
of writing a Java piece of code to connect to DB2 using JDBC and then
execute various queries.
Is there any in-built functionality using which I can export the query
resultset to CSV ?
Thanks
Sumukh

The EXPORT command will do what you want to..

Aug 9 '07 #3

P: n/a
Thanks everybody..

On 9 Aug, 21:37, dotyet <dot...@yahoo.comwrote:
There is just one issue though. You are limited to only 254
characters. So, if you have a varchar of length 500, you will lose 256
characters in the export. I dont know if this limitation has been
removed from V9 or not, but I still face it on our V8 FP 14.

Regards,
dotyet

On Aug 9, 10:41 am, Arun Srinivasan <arunro...@gmail.comwrote:
On Aug 9, 3:38 am, bab...@gmail.com wrote:
Hi there,
I need to extract huge amount of data from a DB2 dabase periodically.
The extracted data needs to be exported to CSV format. I have thought
of writing a Java piece of code to connect to DB2 using JDBC and then
execute various queries.
Is there any in-built functionality using which I can export the query
resultset to CSV ?
Thanks
Sumukh
The EXPORT command will do what you want to..- Hide quoted text -

- Show quoted text -

Aug 13 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.