If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQL0407N Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-05, 09:34
madhuri_awal madhuri_awal is offline
Registered User
 
Join Date: Dec 2004
Location: India
Posts: 23
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..........
Reply With Quote
  #2 (permalink)  
Old 01-14-05, 10:30
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Please post the INSERT statement and the DDL for the table.

Andy
Reply With Quote
  #3 (permalink)  
Old 01-17-05, 02:11
ritz ritz is offline
Registered User
 
Join Date: Jan 2005
Posts: 35
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
Reply With Quote
  #4 (permalink)  
Old 01-17-05, 22:04
Metatron Metatron is offline
Registered User
 
Join Date: Feb 2004
Posts: 21
Post

SQL0407N ??
Do your sql attempt Assignment of a NULL value to a NOT NULL column?
Reply With Quote
  #5 (permalink)  
Old 01-19-05, 05:27
jdey123 jdey123 is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On