Question & Answer
Question
When you insert a multiline paragraph containing blank lines (LF:line feed - X'0A') into a table as one record, the INSERT statement may fail to preserve the blank lines. For example, you want to insert a multiline paragrah with blank lines as below into a table named T3. $ cat paragraph.sql INSERT INTO t3 VALUES ('aaaaa bbbbb ccccc')%% NOTE: The table T3 has definition as: $ db2 "create table T3(desc varchar(30))" When you invoke the paragraph.sql file to insert the value, after insertion you will find the column desc doesn't contain any of the bank lines. $ db2 -td%% -vf paragraph.sql $ db2 "select desc, hex(desc) as hex_value from t3" DESC HEX_VALUE ------------------------------ ------------------------------------------------------------ aaaaa bbbbb ccccc 6161616161206262626262206363636363 1 record(s) selected. So how could you insert a paragraph with blank lines into a table as one record?
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
30 April 2025
UID
swg21404777