473,467 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
3 5412
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RoyalScorpion | last post by:
hi guys, i get an updatable resultset from a connection then used it to insert a new row but the result set doesn't chane after insertion, i mean the no of rows before insertion is the same after...
14
by: atse | last post by:
Hi experts, I retrieve data from the database and display on ASP, then I export these data to a file, like Excel (the best) or text file. Is it possible? I think it is possible, but how can I do...
2
by: Savas Ates | last post by:
I have a stored procedure below.. When I run it with a well parameter in query analyser 3 of select statements return me. (i named select statements 1,2,3) But in asp page when i call this...
7
by: Gandalf | last post by:
Hi all, I am connecting to DB2 8.1 on Solaris through JDBC type 4 drivers (driver: com.ibm.db2.jcc.DB2Driver). Problem is that when a cursored query is done, the resultset gets closed after...
4
by: _link98 | last post by:
Problem: java ResultSet cursor from SQL/PL stored-procedure is FORWARD_ONLY. Is it possible to have ResultSet cursors from SQL/PL procedures to scroll forward and backwards? Perhaps I am missing...
7
by: mattc66 via AccessMonster.com | last post by:
I need to create an EDI 850 Record Set. The EDI 850 Record set I am creating consists of 2-5 seperate tables all linked by the CustomerID and CustomerPO. Tables - tblOrder - >Link CustomerID...
0
by: David Linsin | last post by:
I created a simple test case to reproduce the problem (also check Bug #15500): import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement;...
0
by: babdya | last post by:
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...
1
by: alpareshamwala | last post by:
hi! one and all! i have got stuck !! i am not able to export my data from jdbc resultset to excel do some work and then get back the output in excel back to java thanks alpa
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.