File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Reading BLOB data in DB2 SQL Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Reading BLOB data in DB2 SQL Stored Procedure" Watch "Reading BLOB data in DB2 SQL Stored Procedure" New topic
Author

Reading BLOB data in DB2 SQL Stored Procedure

Keerthi M
Greenhorn

Joined: Sep 10, 2007
Posts: 4
First of all sorry if this is not the right forum for my question.



We are using DB2 v9.5 on Windows/AIX. We have a .txt file which has 100k's records in below format. The file is delimited by newline character as shown in below data format. We have a database column of type BLOB. In this database column we store the .txt file as BLOB data.


data format
---------------

T010 AZ00 0000031
0Z11 A701 0011001
...
...
...


I need to write a DB2 SQL Stored Procedure that reads this BLOB column and parses the individual records(ie. each record is on a newline) and insert in some other tables. Now, my question is how to write such DB2 SQL Stored Procedure to accomplish this.

I would appreciate if you can help me with code snippets, URLs etc.



Thanks & Regards,
Keerthi
 
 
subject: Reading BLOB data in DB2 SQL Stored Procedure