467,887 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,887 developers. It's quick & easy.

How to export resultset to CSV

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
  • viewed: 5041
Share:
3 Replies
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
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
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.

Similar topics

reply views Thread by RoyalScorpion | last post: by
14 posts views Thread by atse | last post: by
2 posts views Thread by Savas Ates | last post: by
7 posts views Thread by Gandalf | last post: by
7 posts views Thread by mattc66 via AccessMonster.com | last post: by
reply views Thread by David Linsin | last post: by
reply views Thread by babdya | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.