String to Decimal - losing negative sign

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
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

String to Decimal - losing negative sign

Post by Marley777 »

Hi thanks for reading.

When converting string -77 from string to decimal using StringToDecimal function I lose the '-' sign....so the number becomes a positive. Anyone know of a solution for this? What the best way to conver negative string value to a decimal?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can't reproduce the problem on my Windows 8.7 machine, "StringToDecimal('-77')" into a Decimal(10) field keeps the negative sign.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are the precision and scale settings for the Decimal target column? Does it have a specifically set display width?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply