Page 1 of 1

transformation error

Posted: Sat Dec 16, 2006 8:12 pm
by vijaykumar
hi Gurus,
my source is oracle, my target is oracle.
iam using ODBC STAGE as source and ODBC STAGE AS TARGET.
i can compile and run, but after running the jobs , i can see that the data is not loaded in the target.iam getting warnings, whenever i run the job, i went to view the warnings from the logfile of director.
i got warning as
DataStage][SQL Client][ODBC][Oracle][ODBC][Ora]ORA-00001: unique constraint (SCOTT.PK_DEPT) violated.
due to this the data is not loading in the target.
plz help me.

cheers;
vijay

Posted: Sat Dec 16, 2006 8:28 pm
by chulett
:? What kind of help do you need? This isn't a DataStage transformation error, but rather a simple database issue that could happen with any tool.

You've violated a Unique Constraint and a Primary Key one to boot going by the name of it. The constraint enforces the field or group of fields which uniquely identify a record, thus only one record can exist that matches that constraint. More than likely, you've tried to insert records with Primary Key values that already exist in the table, but updates can cause this error as well.

Make sure this doesn't happen. Preload existing keys into a hashed file and check against it during your load. Either skip any inserts that already exist or send them down an update link instead. Easy Peasy.

Posted: Sat Dec 16, 2006 8:47 pm
by vijaykumar
hi,
thanks very much , i was specifying the same table name in the source and target.

cheers;
vijay

Posted: Sat Dec 16, 2006 9:05 pm
by chulett
... or just make sure your table names are correct. :wink:

Posted: Sun Dec 17, 2006 12:13 am
by I_Server_Whale
vijaykumar wrote:hi,
thanks very much , i was specifying the same table name in the source and target.

cheers;
vijay
Well! It will be great if you mark the post as resolved. :)