Page 1 of 1

How to Trap Oracle Error fileldwise per Record

Posted: Thu Aug 16, 2007 3:24 am
by ArijitS
[size=12][/size]
I have a record having comma seperated coloumns.There are total 50 coloumns.I want to check the error of the filed label incase of business logic and Oracle-table insertion error.Incase of business logic it is ok.But incase of Oracle-error while we are implementing with DSLinkLastErr.But there it only traps the first occurence for Oracle Error.

Re: How to Trap Oracle Error fileldwise per Record

Posted: Thu Aug 16, 2007 6:31 am
by krishobby
You can have a reject link to the Oracle Enterprise Stage while using UPSERT operation which will allow you to refer the SQLSTATE and SQLCODE in the reject output.

Posted: Thu Aug 16, 2007 7:26 am
by chulett
That would be a PX answer not applicable to a Server job, please keep an eye on the forum you are in and to the Job Type.

No can do. Oracle will only report one error at a time even if you have a multiple problems. That's just the way it works. Unless I've misunderstood what you meant by 'first occurrence', in which case have another go at explaining your problem.

Posted: Sun Aug 19, 2007 12:35 am
by ArijitS
[quote="chulett"]That would be a PX answer not applicable to a Server job, please keep an eye on the forum you are in and to the Job Type.

No can do. Oracle will only report [b]one error at a time[/b] even if you have a multiple problems. That's just the way it works. Unless I've misunderstood what you meant by 'first occurrence', in which case have another go at explaining your problem.[/quote]

By "first occurence" i mean suppose in a record of 50 coloumn there are errors in 10th,12th,45th field then Datastage server can only trap the the first occurence ie 10th coloumns error not the 12th,45th at that time.

Posted: Sun Aug 19, 2007 12:44 am
by ray.wurlod
That's correct. The first. Absolutely the first. Oracle reports the first error and stops. You fix the first, Oracle will then report the next, and stop. And so on.

Most database servers, and most application development tools (possibly except compilers) behave in this fashion.

Posted: Sun Aug 19, 2007 7:57 am
by chulett
So, no misunderstanding at all. As noted, only one Oracle error will be reported at a time. You fix it and then the next will be raised. Lather, rinse, repeat. This is not a 'DataStage server' behaviour, it is a standard database behaviour.