accuracy of 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
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

accuracy of value

Post by sunitha_cts »

hi,

my source value as 12345.67 but i need only 12345.6value as my target
can anyone give a solution on this.

Thanks
sunitha
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

INT(In.MyNumericColumn*10)/10
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Read the documentation on (String|Decimal)ToDecimal, there are options to round towards 0, down or up
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

use decimaltodecimal(<input column>,"trunc_zero")
and set the column as (scale,1 as precision)

if you need to round it then use

decimaltodecimal(<input column>,"round_inf")
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply