Page 1 of 1

Character Aggregation

Posted: Tue Aug 07, 2007 11:51 am
by mail2krishna79
I am trying to aggregate the character of size 1 to find the max and min based on two values, will aggregation stage work for this req.

Version is DS Parallel 7.5x

Any help is appreciated

Thanks

Posted: Tue Aug 07, 2007 12:14 pm
by kcbland
Do you mean a lexicographic MAX()? A < a on the ASCII chart, A < B on the ASCII chart, etc. Is this what you mean?

Posted: Tue Aug 07, 2007 12:25 pm
by mail2krishna79
No just two suppose you get value 'A' or 'B' in rows with key 200 and you want to get the minimum value 'A' and remove the dup 'B' for the same key 200, along with counting the number of rows for key 200.

Hope this makes the situation clear

Posted: Tue Aug 07, 2007 2:16 pm
by jguerrero
Just use Aggregator Stage, the firs output fiel must be the "key", with group by this field. For the second choose MIN to obtain the minimun value of the field "A","B",...an so on....

Finally create a third field (column) with the function count for the input fiel "key".

That's all

Regards

Posted: Tue Aug 07, 2007 6:58 pm
by mail2krishna79
I thought there was a problem with character aggregation in PX. Please help if this case is not true with 7.5 PX.

Thanks