reading data from oracle with duplicates

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
chvenkat.v
Participant
Posts: 94
Joined: Fri Dec 14, 2007 3:22 am

reading data from oracle with duplicates

Post by chvenkat.v »

hi

i am reading data from oracle table emp: the data look like this...

empno deptno sal
1 10 1000
1 20 2500
1 10 3000
2 10 2500
2 30 500
2 20 2100

i want report like this
maxsal empno deptno no.of emp in dept

pls tell me it can be write in sql query or using any stage in datastage.



thnks
venkat
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This looks like an ideal task for an Aggregator stage. You could also do it in SQL using MAX and COUNT set functions.
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