Hello,
I am trying to insert 1 record to an empty table....
and when I run the job I get the following error:
DBMS.CODE=-407, SQLSTATE=23502, [IBM][CLI Driver][DB2/AIX64] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=7, TABLEID=275, COLNO=7" is not allowed. SQLSTATE=23502
But for example if the record is already in the database and i run the job with the option 'update or insert new records' the job runs successfully...
Any idea why I am not able to insert the record when the table is empty....The data does not have any null values.
Would appreciate any advice
Thanks
Unable to Insert New Record
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
when you are performing update or insert it may be success due to there is no change in the col7. when you are trying to insert record for the first time, that too your record is having NULL value, but in the table it is mentioned as non-nullable column, so how come a NULL value will be instered into a NON-NULLABLE Column. so ensure that it is not NULL or change constraint of the col in such a way to allow NULL.
with regards,
tsn
tsn