Page 1 of 1

To Get Maximum 3 values in Datastage

Posted: Sun Dec 12, 2010 10:51 pm
by Shruthi
Hi,

I have a table like this
E.No Salary
1 1000
2 2000
3 5000
4 4000
5 1200

I want top three employee numbers who have maximum salary. How can this be acheived?

Thanks,
Anitha

Posted: Sun Dec 12, 2010 11:04 pm
by ray.wurlod
Sort them and run them through a Head or Tail stage. Run in sequential mode (or perhaps on three nodes, but this is not guaranteed to be accurate). You don't need an Aggregator stage - there is no solution involving an Aggregator stage.

Posted: Sun Dec 12, 2010 11:09 pm
by Shruthi
Thanks... This really helps