File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading BLOB data in DB2 SQL Stored Procedure

 
Keerthi M
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic