Page 1 of 1

Rejects

Posted: Wed Dec 21, 2005 9:32 am
by Indrani
Hi,
Iam catching the Rejects from my output table using REJECTS code. And if my input is 10000 rows and Iam getting 25 rejects caught in a flat file. For the first run, it was good. If Iam running the same job with 10005 records. Iam catching the 10000 records as the rejects, b'cos i know that all those records all already there in the table with a key. I want only the 25 rejects in my flat file. Is there a way I can catch it?

Posted: Wed Dec 21, 2005 9:37 am
by reddy
Do it with Constarint on key filed like Not[isnull(keyfield)] so it can not capture existing ones.

Thanks
Reddy

Posted: Wed Dec 21, 2005 9:39 am
by kcbland
Why are the 10000 rejecting? Primary key violation with INSERT ONLY SQL? You already know the answer. Don't try to INSERT rows that are already there, or switch your SQL to INSERT or UPDATE and superfluously update them (potentially). Or, build a more intelligent job that references the target and uses the knowledge of finding the row or not when sending the row on for loading. Existing rows could go to a link that performs pure UPDATE SQL, while non-existent rows go to the INSERT ONLY link.