Inserting data on IBM DB2 results on SQLCODE: -180, SQLSTATE: 22007

One Star

Inserting data on IBM DB2 results on SQLCODE: -180, SQLSTATE: 22007

I'm trying to insert some rows on a IBM DB2, but I'm getting an error. Here is the query generated by Talend:
INSERT INTO "TOTCHQ" ("CODREM","NUMDOCC8","NOMPES","NUMBAN","CODAGEBN","QTDCHQDL","DATULTOA") VALUES ('3080',99999999999,'FULANO DE TAL',100,'0000',2,'2012-11-28')
DB2 SQL error: SQLCODE: -180, SQLSTATE: 22007, SQLERRMC: null - Line: 0
Seems like the date column (DATULTOA) is in wrong format, but it isn't.
The same command, when executed on another tool (like DbVisualizer) or even directly, runs ok.
Here is my table metadata:
CODREM VARCHAR(4)
NUMDOCC8 DECIMAL(14, 0)
NOMPES VARCHAR(50)
NUMBAN SMALLINT
CODAGEBN VARCHAR(6)
QTDCHQDL SMALLINT
DATULTOA DATE
Does anyone have any idea about the reason for this error?
Thanks in advance.
One Star

Re: Inserting data on IBM DB2 results on SQLCODE: -180, SQLSTATE: 22007

I found a workaround, but it isn't very fast.
Instead of using a tDb2Ouput, I'm using a tDb2Row, and in Query field, I've put this:
"INSERT INTO \"TOTCHQ\" (\"CODREM\",\"NUMDOCC8\",\"NOMPES\",\"NUMBAN\",\"CODAGEBN\",\"QTDCHQDL\",\"DATULTOA\") VALUES ('"+INSERE.CODREM+"',"+INSERE.NUMDOCC8+",'"+INSERE.NOMPES+"',"+INSERE.NUMBAN+",'"+INSERE.CODAGEBN+"',"+INSERE.QTDCHQDL+",'"+TalendDate.formatDate("yyyy-MM-dd",INSERE.DATULTOA)+"')"

The funny part is: the generated query is the same as the one generated by tDb2Output component!
tDb2Ouput generated query:
INSERT INTO "TOTCHQ" ("CODREM","NUMDOCC8","NOMPES","NUMBAN","CODAGEBN","QTDCHQDL","DATULTOA") VALUES ('3080',57608849991,'DESINA ALEXANDRE CAETANO AMERICO',104,'0415',2,'2012-11-28')

tDb2Row final query:
INSERT INTO "TOTCHQ" ("CODREM","NUMDOCC8","NOMPES","NUMBAN","CODAGEBN","QTDCHQDL","DATULTOA") VALUES ('3080',57608849991,'DESINA ALEXANDRE CAETANO AMERICO',104,'0415',2,'2012-11-28')

Maybe it's a bug? Is someone else having troubles with tDb2Output component?
Best regards.
One Star

Re: Inserting data on IBM DB2 results on SQLCODE: -180, SQLSTATE: 22007

Sometimes when you insert data on a IBM DB2 then it will result on SQLCODE: -180, SQLSTATE: 22007 because of the lack of space. However, you can fix this error using DB2 File Repair Tool. This tool will be able to fix any SQL error you generally get while accessing DB2 database. To Know more about this tool, you can log on to: