db2 sql error 23502
occurred: v A null insert or db2 sql error: sqlcode=-407, sqlstate=23502, sqlerrmc=*n update value was specified for a column defined as NOT NULL. sql0407n v No insert value was provided for a column that does not have a default value. v A https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.codes/src/tpc/n407.html SET transition variable statement specified a NULL value for column defined as NOT NULL. v The insert value was DEFAULT, but the object column was declared as NOT NULL without WITH DEFAULT in the table definition. Consequently, http://www.sqlerror.de/db2_sql_error_-407_sqlstate_23502.html a default value of NULL cannot be inserted into that column. v A null insert value was specified for a ROWID column.System action: The statement cannot be executed. The 'column-name' might be returned in the SQLCA, depending on the syntax of the SQL statement in which the error was detected. Programmer response: Examine the definition of the object table to determine which columns of the table have the NOT NULL attribute or have a type of ROWID, and correct the SQL statement accordingly. <- BACK TO INDEX This is a free Service. I assume no warranty for misprints, and for the correctness and completeness of information and entries.
View Site Leaders Advanced Search Forum Pentaho Users Pentaho Data Integration [Kettle] Error inserting rows in a table 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: http://forums.pentaho.com/showthread.php?77825-Error-inserting-rows-in-a-table click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: Error inserting rows in a table Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 08-11-2010,03:15 PM #1 omm View Profile View Forum Posts Private Message Senior Member Join Date Jun 2010 Posts 114 Error inserting rows in a table sql error : Not null constraint I am trying to upload data from an excel sheet to a table. Since my target table has all the columns as not null, I have replaced all the null values with some default values using replace null value step. But still, I am getting the error below. DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=6, TABLEID=260, COLNO=1, DRIVER=3.50.152 To double check, I have kept only one row in the excel sheet and have checked the values passed in the stream after the db2 sql error replace null value step. Everything looks fine. I should be missing something. Could there be any chance that the error could be thrown for any other reason other than the one related to Null values? Last edited by omm; 08-12-2010 at 11:54 AM. Thanks, Om ---------------------- Spoon version -4.4.0 Reply With Quote 08-11-2010,04:54 PM #2 cboyden View Profile View Forum Posts Private Message Pentaho Developer Join Date Mar 2008 Posts 140 Things to try I have never used DB2 and Google says that -407 is a null value going into a column with a not null constraint, so... The three things I would try: 1) Replace "Table output" step with a "Dummy" step and preview it. To see what is coming out of your transformation. 2) Replicate the data using a "Row Generator" step and push data into the table to make sure there is not something strange going on with DB2 and that table. (Maybe the -407 is for something else) 3) Replace the "Table Output" step with another table output step to another database (like mysql) and see if that works. It could be a driver issue or something similar. If nothing else you might find your problem along the way. If you have more info please post it. I hope this helps, -Curtis Reply With Quote 08-12-2010,11:42 AM #3 omm View Profile View Forum Posts Private Message Senior Member Join Date Jun 2010 Posts 114 Originally Posted by cboyden I have never used DB2 and Google says that -407 is a