Results 1 to 5 of 5

Thread: SQL0407N Error

  1. #1
    Join Date
    Dec 2004
    Location
    India
    Posts
    23

    Unanswered: SQL0407N Error

    Hi all,
    I am getting the follwoing error when executing a simple insert command

    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2,
    TABLEID=528, COLNO=0" is not allowed. SQLSTATE=23502


    I am not getting what the error is...Also i am not inserting any null value....

    Pls help...

    Thanks in advance..........

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Please post the INSERT statement and the DDL for the table.

    Andy

  3. #3
    Join Date
    Jan 2005
    Posts
    36
    Hi,

    The SQL0407N Error help shows the following SQL statement.

    SELECT C.TABSCHEMA, C.TABNAME,
    C.COLNAME
    FROM SYSCAT.TABLES AS T,
    SYSCAT.COLUMNS AS C
    WHERE T.TBSPACEID = n1
    AND T.TABLEID = n2
    AND C.COLNO = n3
    AND C.TABSCHEMA = T.TABSCHEMA
    AND C.TABNAME = T.TABNAME

    If you substitute the values for the TBSPACEID, TABLEID and COLNO shown in the error you will get the column for which a NULL is being inserted.

    Then you should be able to trace back to the actual cause of the error.

    Regards,
    ritz

  4. #4
    Join Date
    Feb 2004
    Posts
    21

    Post

    SQL0407N ??
    Do your sql attempt Assignment of a NULL value to a NOT NULL column?

  5. #5
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    31

    Possibly a trigger

    There could also be a trigger on the table that you are inserting into.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •