Home » SQL & PL/SQL » SQL & PL/SQL » Aleatory Numeric or Value error
icon8.gif  Aleatory Numeric or Value error [message #228927] Wed, 04 April 2007 09:50 Go to next message
mestebanpt
Messages: 4
Registered: April 2007
Location: Spain
Junior Member
Hello everybody.

I'm new in this forum. I've arrived here looking for a problem that I have with an application that I am developping.

The platform I am using is .Net Web (C#) with Oracle 9i.

My problem is with an Stored Procedure that runs well but any times it produces a Numeric or Value Error. Then I rerun the same code that generates the stored, rerun the stored with the same parameters and the error disapears.

The "first" time I run the stored it runs ok but next times it crashes aleatory.

Any body has any suggerence??

Thanks in advance and sorry but my poor english,

Michael.
Re: Aleatory Numeric or Value error [message #228937 is a reply to message #228927] Wed, 04 April 2007 10:45 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Unless you posted your code and the definition of objects it access, we can't help you.

Btw, also post your Oracle version.
I mean ALWAYS post your Oracle version.

Regards
Michel
Re: Aleatory Numeric or Value error [message #228954 is a reply to message #228937] Wed, 04 April 2007 12:07 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
It sounds like an implicit datatype conversion problem. This often happens when you store numbers in character type columns or variables. In a case like this, Oracle may either convert the Left to a number or the Right to a character.

if empno is number, the Optimizer will convert this:
where empno = '1'
to
where to_char(empno) = '1'
or
where empno = to_number('1')


You should use explicit conversions for numbers, strings and especially dates. Explicit conversions of null usually aren't required (null is varchar2).




Re: Aleatory Numeric or Value error [message #228987 is a reply to message #228954] Wed, 04 April 2007 17:03 Go to previous messageGo to next message
mestebanpt
Messages: 4
Registered: April 2007
Location: Spain
Junior Member
It sounds good !!

I try to revise my stored proc following your suggestion and post results tomorrow.

Regards,

Michael.
Re: Aleatory Numeric or Value error [message #229700 is a reply to message #228987] Mon, 09 April 2007 14:12 Go to previous messageGo to next message
The Phantom Nitpicker
Messages: 1
Registered: August 2006
Junior Member
Excellent word Aleatory, now that I've looked it up Wink

Normally people would use a more common word such as "random", "unpredictable", "intermittent", "occasional" etc, but I think aleatory's meaning of "Dependent on chance, luck, or an uncertain outcome" or "Of or characterized by gambling" is great here.

[Updated on: Mon, 09 April 2007 14:22]

Report message to a moderator

Re: Aleatory Numeric or Value error [message #229701 is a reply to message #229700] Mon, 09 April 2007 14:17 Go to previous message
mestebanpt
Messages: 4
Registered: April 2007
Location: Spain
Junior Member
You are right. I said my english is very litle. Sorry.
Previous Topic: Merge CSV files
Next Topic: HELP!!! Oracle DATE Functions...Query data 5 months prior
Goto Forum:
  


Current Time: Sat Dec 10 12:43:44 CST 2016

Total time taken to generate the page: 0.09886 seconds