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

Stumped With Clob data

P: n/a
I have a table with a clob column with 10 records and each record is
around 1MB.
I just want to know is there any way that i can export or send this
clob data of each record into separate file.
For eg:
clob data of first row into datafile1.txt
clob data of second row into datafile2.txt
and so on
Any kind of help will be greatly appreciated.


Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I don't think you can do this in straight way.

Export command allows you to separate lobs into different file, but
this file can contain many lobs (in the master file you will find
references and offsets to the lob file).

But it is not a difficult to write script that will export row by row
-- you can control the filenames.

Here is an example of export of a single row:

db2 export to data of del LOBFILE procedure.65832 modified by
lobsinfile select * from syscat.procedures where PROCEDURE_ID = 65832

cat data >> master_data

With one sql you can output a static shell script which will do this
for all rows in your table.

-- Artur Wronski

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.