Comparing decimal value

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
moulipx
Participant
Posts: 22
Joined: Tue Mar 09, 2010 8:13 am

Comparing decimal value

Post by moulipx »

Hi All,

I need to some help with decimal value comparsion.
Iam having source field col1 as datatype Decimal(38,10)

Requirement value
If col1=0.5Then 5
Else 0

Input Value : 0000000000000000000000000000.5000000000

please advice me how to compare decimal value with 0.5.

Thanks,
chandra
Chandra Mouli
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your input value, is that what View Data shows? And what happened when you tried to compare those values?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

These are two representations of the same value. They will compare equal.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly... hence my second question.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply