Page 1 of 1

Reqire logical assistance

Posted: Mon Mar 14, 2011 7:42 pm
by creatingfusion
Requirement:

The input data looks somethin like -
Col_A|Col_B|Col_C|Col_Date1|Col_Date2
A|B|C|2001/01/01|2002/01/03
A|B|C|2001/01/02|2002/01/04
A|B|C|2001/01/03|2002/01/05

The output should be:
Col_A|Col_B|Col_C|Col_Date1|Col_Date2
A|B|C|2001/01/01|2002/01/05

Requirement: if Col_A, Col_B and Col_C are same amongst the input columns then the output should be only one row with Col_A, Col_B and Col_C and pick up the earliesrt date of Col_Date1 and recent date of Col_Date2

Please provide yours solutions how this can ba implemented using datastage.

Regards
Abhijit

Posted: Mon Mar 14, 2011 8:18 pm
by chulett
Not sure why you felt the need to hijack a completely unrelated thread for this question, regardless here we are all split out on your lonesome. Please take more care next time. Also note that I've had to guess at your particulars regarding version, O/S etc... if any are wrong please edit your post and correct them.

Posted: Mon Mar 14, 2011 8:27 pm
by chulett
Looks to me like Aggregation, grouping on the first three columns and then min/max on the other two.

Posted: Mon Mar 14, 2011 8:45 pm
by ray.wurlod
Looks to me also like Aggregation, grouping on the first three columns and then min/max on the other two.

Don't forget to get your partitioning (and sorting, if you need it) correct.