Page 1 of 1

Aggregator O/p Data on summation

Posted: Wed Oct 13, 2004 10:00 pm
by dhletl
Hi,

In the aggregator stage, is there an option that the o/p of summation of a decimal field is produced in the desired decimal format - without any leading / trailing zeroes.

From example -(i/p and o/p from aggregator based on a key)

I/P --fld1 values--100,200, 300
O/P--Sum(fld)1---600.0 [and NOT 000006000.00 for dataype decimal(11,2) ]

I understand it can be handled later in downstream using a transformer stage. I am looking for a direct solution - possibly in the aggregator stage itself.

Thanks,
Nitin

Posted: Wed Oct 13, 2004 11:13 pm
by ray.wurlod
No.

(Can't get more direct than that.)

Posted: Thu Oct 14, 2004 3:13 am
by dhletl
Thanks Ray..

Then...What is your suggestion on the simplest way to convert a field of data type double to a data type decimal of specific precision say decimal(22,2)

Rgds,
Nitin

Posted: Thu Oct 14, 2004 3:44 pm
by ray.wurlod
A following Transformer stage would seem to be the easiest. And/or a build op if you're into coding of these beasts. The build op gives you greater flexibility in handling out of range values (precision 22 may not handle all Double numbers).