how to find the enddate

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

how to find the enddate

Post by uppalapati2003 »

No1 no2 no3 eff_date end_date
1 1 1 2007-11-20 9999-12-31
1 1 1 2007-11-17 2007-11-18
1 1 1 2007-11-12 2007-11-15


This is the my sample source data..what i need is whenever the combination of the (no1,no2,no3) of the first record and the combination of the second is same the end date of the previous record is the effective record -1

target data like this


No1 no2 no3 eff_date end_date
1 1 1 2007-11-20 9999-12-31
1 1 1 2007-11-17 2007-11-19
1 1 1 2007-11-12 2007-11-16 .

if any body have any idea please let me know that was very helpful to me
Srini
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Sort stage to sort by the three keys and the generate a key change column. Use a Transformer stage, with stage variables to "remember" the value of the date from the previous row. Reset on key change.
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