If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to insert contents into BLOB without using SQl???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-11, 04:54
rameshiniyan rameshiniyan is offline
Registered User
 
Join Date: Dec 2011
Posts: 1
How to insert contents into BLOB without using SQl???

Hi,


Can anyone resolve my issue on inserting the data into BLOB column using scripts alone rather than using SQL query??? Is tat possible???
Reply With Quote
  #2 (permalink)  
Old 12-06-11, 05:00
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
I don't understand the question
you can only insert in a db/table/col data by use of sql
the sql can be in a flat file and executed with db2 -tvf command
or with script invoking db2 ".............."
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 12-06-11, 13:21
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
A BLOB is a value in a database. So the only way to get such values into the database or to retrieve them from there is through the means provided by the database system. That means: SQL.

What you could probably do is to store the data in a file in the file system and only the path in the database. Then you can access the data directly and bypass the database system. But in this case you'd probably use a VARCHAR and not a BLOB to store the path to the file.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 12-06-11, 20:57
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
You can use import command with modified by lobsinfile option to insert file into lob col...
Reply With Quote
Reply

Tags
blob, data, insert, scripts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On