How to import tab delimited file into IBM DB2 UDB table
Posted on 2008-08-19 19:43 Prayer 閱讀(507) 評論(0) 編輯 收藏 引用 所屬分類: DB2I need to import tab delimited data into a DB2 UDB table. Character strings are not delimited.
The importcommand fails
IMPORT FROM "mytable.del" OF DEL MODIFIED BY COLDEL0X09 MESSAGES "mytable.log" INSERT INTO mytable;
Fails with a message for each row
SQL3116W The field value in row "1" and column "2" is missing, but the target
column is not nullable.
I have checked the input file and it does have tab characters delimiting fields so it would appear that the lack of character string delimiters is causing a problem.
I have tried CHARDEL"" along with COLDEL0X09 with same result (as expected, I guess).
The import file was produced by another IBM product, iSeriesAccess for Windows data transfer facility.
Question: How import a tab delimited file with no character string delimiters into a DB2 UDB table.
The import
IMPORT FROM "mytable.del" OF DEL MODIFIED BY COLDEL0X09 MESSAGES "mytable.log" INSERT INTO mytable;
Fails with a message for each row
SQL3116W The field value in row "1" and column "2" is missing, but the target
column is not nullable.
I have checked the input file and it does have tab characters delimiting fields so it would appear that the lack of character string delimiters is causing a problem.
I have tried CHARDEL"" along with COLDEL0X09 with same result (as expected, I guess).
The import file was produced by another IBM product, iSeries
Question: How import a tab delimited file with no character string delimiters into a DB2 UDB table.