ORA-01722: invalid number ERROR

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

ORA-01722: invalid number ERROR

Post by Arpanakhade2009 »

Hi,
I recieve follwoing warning when i execute a DS job
ORA-01722: invalid number

There is a select query on an oracle view (oracle stage) to populate into a sequential file.
An error is prompted when i execute the same select query through TOAD.
I want the DS job to abort with the error "ORA-01722: invalid number " and not warning.

Please do let me know if i need to make any admin level setting (parameter property to be modified) to abort the job for such kind of errors.

Thanks!
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

details please, we need to know which stage you are using and the exact version and release of datastage.

Are you using ODBC to fetch data?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

Post by Arpanakhade2009 »

No oracle enterprise stage
Arpana
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

Post by Arpanakhade2009 »

Oracle enterprise stage is used for extract.
Any other dtls reqd.


I know we can promote an information to warning but can we promote a warning to error. How?
Arpana
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you please post the query and the data types of the columns mentioned in the query?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

Post by Arpanakhade2009 »

The query is very complex thus stating it in simplified format as below:
1.There is table named A1 which has columns of datatype number and varchar. From this table data is populated into a view vB1.
2. Similar way data from different tables (A1,A2....) is populated into different views(vB1,vB2...)
3. Union of all views (vB1,vB2...) is taken and populated into another view 'VMain'.
4. Select query to this main view 'VMain' is done in Oracle Stage which has datatype number and varchar.

Problem identified for the error is that there is Sum function used for col1 of table A1 to populate view vB1.
And col1 has space ' ' in the record. Due to which the warning named 'ORA-01722: invalid number' is prompted


In DS job i want to know for which record the warning has occured and also want to abort the job for such warnings


Thanks!
Arpana
invincibleDeepak
Participant
Posts: 14
Joined: Sun Jun 07, 2009 12:26 pm
Location: Mumbai

Post by invincibleDeepak »

ORA-01722 Invalid number error is cause the attempted conversion of a character string to a number failed because the character string was not a valid numeric conversion. Which stage you are using for this query? We have a option for tpump/multiload to check checkbox for throwing error.
regards
Deepak Kumar
Datastage Developer
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

Post by Arpanakhade2009 »

The view 'vMain' is created not by any DS job but by an SQL query in Toad.

Are these option available in Datastage as in Toad i am getting the error while i execute the sql query
Arpana
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You would need to run the job with a low warning threshold so the job aborts because of the warnings but I don't believe there is a way you could abort the job because of this specific warning. :?

You've got other options in a Server job, the OCI stage has an option to 'treat warnings as fatal' (so you could single things like this out) but I don't believe the OE stage has anything similar and can't check at the moment.
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

as a workaround you can create a after job sub-routine to check the status of that job and if the status is finished with warning return Errorcode <>0 or you can even scan the logs for specific warning before raising an error.

I would suggest you to go to official support provider.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, that's another option. If you go the 'after job' route and scan the log, make sure you check the INTERIM status to know if there has been a problem or not.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Arpanakhade2009
Participant
Posts: 30
Joined: Tue Sep 08, 2009 4:24 am

Post by Arpanakhade2009 »

Thank you all for your prompt replies, will informyou once i am able to resolve the above mentioned problm
Arpana
Post Reply