wxsheng 发表于 2016-11-17 08:55:20

DB2 SQL0407N : Assignment of a NULL value to a NOT NULL column “TBSPACEID=2, TAB

.

Posted on December 1, 2008 by nitingautam


SQL0407N Assignment of a NULL value to a NOT NULL column name is not allowed.
If you encounter this error and If the value for name is of the form “TBSPACEID=n1, TABLEID=n2, COLNO=n3”, you can determine the table name and column name using the following query:
 


 
SELECT C.TABSCHEMA,
C.TABNAME, C.COLNAME FROM SYSCAT.TABLES AS T,
SYSCAT.COLUMNS AS C WHERE
T.TBSPACEID = 2 ANDT.TABLEID = 26 ANDC.COLNO = 0 AND
C.TABSCHEMA = T.TABSCHEMA ANDC.TABNAME = T.TABNAME



   
页: [1]
查看完整版本: DB2 SQL0407N : Assignment of a NULL value to a NOT NULL column “TBSPACEID=2, TAB