I am inserted a record into a table that contains a DBCLOB field, the record is successfully added after executing the statement except that the DBCLOB field has inserted nothing. I have tried all the followings for the DBCLOB field:
all of them returned nothing for the field of the new record. Could anyone please give me some idea on it?
The version of DB2 I am using is ESE UDB 8.1.5, thanks!
I don't know what exactly you are doing, but I simply use 'sample' to insert into the field.Infact,I created a table containing dbclob(1m),insert a record into that field and select it using substr(text,1,20)
The string in the first line "txt1.001.0.25/" is called a LOB Locator
An LLS is a string indicating where LOB data can be found within a file.
The format of the LLS is filename.ext.nnn.mmm/, where filename.ext is
the name of the file that contains the LOB, nnn is the offset of the LOB
within the file (measured in bytes), and mmm is the length of the LOB
(in bytes). For example, an LLS of db2exp.001.123.456/ indicates that
the LOB is located in the file db2exp.001, begins at an offset of 123
bytes into the file, and is 456 bytes long. If the indicated size in the
LLS is 0, the LOB is considered to have a length of 0. If the length is
-1, the LOB is considered to be NULL and the offset and file name are
3. Created a table test_clob
create table test_clob(a int not null primary key, b clob(10k))
I have defined the table with a primary key so that I could use the
4. Imported the data into test_clob
E:\exports>db2 import from import.del of del lobs from e:\exports\
modified by lobsinfile insert_update into test_clob
SQL3109N The utility is beginning to load data from file "import.del".
SQL3110N The utility has completed processing. "3" rows were read from the input file.
SQL3221W ...Begin COMMIT WORK. Input Record Count = "3".
SQL3222W ...COMMIT of any database changes was successful.
SQL3149N "3" rows were processed from the input file. "3" rows were successfully inserted into the table. "0" rows were rejected.
Number of rows read = 3
Number of rows skipped = 0
Number of rows inserted = 3
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 3
Visit the new-look IDUG Website , register to gain access to the excellent content.
in fact, the case is originally using SQL server then transfer the database schema to DB2. It automatically alter the ntext datatype to dbclob datatype, it will insert data directly to the database, is there any other way that I can do that in stead of using text files?