cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle -ve sign in JDBC SP

Former Member
0 Kudos

Hi ,

We have sending -ve value to JDBC stored procedure where the SP type is DECIMAL.but, its giving error that "number format exception caught".

I think DECIMAL type will not be able to convert -ve sign. How can i handle this..?

ex:

input value   =  2345.00-

required output in JDBC SP is :  2345.00-

used type in SP structure : DECIMAL 

Should i change SP type to some other data type to handle -ve sign ? how to do that ?

plz help

Vin 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vin

I think the problem is because minus ( - ) sign at the end. Correct format should be like below

- 2345.00

You can change the format in PI mapping and then send it to SP.

Former Member
0 Kudos

Hi,

If i get -ve to starting position , will it work in SP..?

my question is will DECIMAL type in SP accept -ve sign values..?

vin

Former Member
0 Kudos

Hi Vin

Yes decimal should be able to accept negative values. Check this

SQL DataType Negative Decimal - Stack Overflow

Answers (0)