Page 1 of 1

SQLSTATE=23000, DBMS.CODE=2601

Posted: Thu Jun 16, 2011 12:28 pm
by mail2krishna79
Hi, I am getting below warning message. I searched on SQLSTATE=23000 in dsxchange but did not get answer. Can you please tell me what exactly this means?

My job design is Hash file ---->TFM---->ODBC Stage

tgtins.xfm.DW_Root: DSD.BCIPut call to function SQLExecute failed.
SQL statement:INSERT INTO "DW_Root"("Root_Code", "Root_Description", DW_SOURCE, DW_BATCH_ID) VALUES (?,?,?,?)
SQLSTATE=23000, DBMS.CODE=2601
[DataStage][SQL Client][ODBC][IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.DW_Root' with unique index 'IDX_Site_Code'.
SQLSTATE=01000, DBMS.CODE=3621
[DataStage][SQL Client][ODBC][IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]The statement has been terminated.

root_Code = "6033"
root_Description = "?-UNKNOWN"
DW_SOURCE = "China"
DW_BATCH_ID = "20110616130116"

Posted: Thu Jun 16, 2011 1:44 pm
by chulett
Sorry, but isn't the error message clear enough?

Cannot insert duplicate key row in object 'dbo.DW_Root' with unique index 'IDX_Site_Code'

Posted: Thu Jun 16, 2011 2:14 pm
by mail2krishna79
Craig,
That is the warning message in Datastage director. I don't have any thing other than that warning message.

Posted: Thu Jun 16, 2011 2:39 pm
by ray.wurlod
You don't need anything more. You have to inspect the data you're sending - you are attempting to insert a record that violates the unique constraint implemented by the index named in the error message.