Page 1 of 1

ODBC - SQL write errors

Posted: Wed Mar 03, 2004 8:45 am
by kwt10
I was just wondering if there was a way to trap ODBC write errors to SQL files. I am combining multiple files into one that have the same key information. I seem to be getting some files that have duplicate keys so they do not write. Is there anyway that I can trap out the records that are not being written?

Thanks

Re: ODBC - SQL write errors

Posted: Wed Mar 03, 2004 9:11 am
by raju_chvr
Oh yeah . the reject link. but do u want to write the rejected data into SQL files or Sequential files. I was confused ? :oops:

Posted: Wed Mar 03, 2004 9:18 am
by kwt10
I would love to write them out to a seq. file. That would allow me to look at the data and see any issues.

I am new at the DS thing. Can you explain how I would use the reject link for this?

Thanks

Posted: Wed Mar 03, 2004 9:42 am
by kcbland
Look in the online manual for the transformer stage. You can setup a sequential file as a second output from a transformer, where the first output is an ODBC/OCI stage. Checking the reject box in the transformer constraint dialog automatically refers DB rejected rows down that link.

Posted: Wed Mar 03, 2004 1:57 pm
by kwt10
I did this and ran it but none of my rows were moved to the reject file. I know that I have 1000 records (not real number) in the input file, once the stage is finished it says 1000 records were written, but when I look at the SQL file created it only has 995 rows in it. We have looked at the input files and the do not have any duplicate keys so we just don't get it.

Thanks

Posted: Fri Mar 05, 2004 8:53 am
by kwt10
Found the problem!! We had data entry people who entered data in lower case AND upper case in the keyed fields. Our system was fixed a couple years back to upper case all stuff and these records were entered before that. So we ended up with keys in lower case and upper case that matched. I changed my DS job to not update records and to kick out the errors to a file.