How to convert Double datatype to Decimal from the Aggregat?

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
vijaykumarpj1
Participant
Posts: 4
Joined: Tue Apr 20, 2010 11:06 pm
Location: Pune

How to convert Double datatype to Decimal from the Aggregat?

Post by vijaykumarpj1 »

Hi,

Could you please let me knw How to convert Double datatype to Decimal from the Aggregator for the Count operation?

Thanks,
Vijaykumar P J
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is a property called something Default Decimal Output that can be set globally (within the Aggregator stage) or for individual columns. You set the precision and scale for the decimal number, separated by a comma. You can also use this property if the target field is an integer of some kind (scale is zero in this case, of course).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumarpj1
Participant
Posts: 4
Joined: Tue Apr 20, 2010 11:06 pm
Location: Pune

Post by vijaykumarpj1 »

ray.wurlod wrote:There is a property called something Default Decimal Output that can be set globally (within the Aggregator stage) or for individual columns. You set the precision and scale for the decimal number, s ...
Hi Ray,

That is the property only if we select the operation as Calculation. This option will not be available if we are doing Count operation.


Thanks,
Vijaykumar P J
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's true. When Count is the operation you have to accept Double as the output data type (or tolerate the warning message). You can change it with a downstream stage, such as a Modify stage.
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