All,
I need your help on a design,here is the sample data of a file. I need to get the output as shown below. Not sure how to get this result. I could not find out a way to do it datastage. Can you please guide me?
Source
key,Field,Start_dt,End_Dt
1234,ABCD,1/1/2000,1/1/2001
1234,ABCD,1/1/2001,1/1/2002
1234,ABCD,1/1/2002,1/1/2003
1234,DEFT,1/1/2003,1/1/2005
1234,ABCD,1/1/2005,1/1/2007
1234,ABCD,1/1/2007,1/1/2009
1234,DEFT,1/1/2009,12/31/9999
Ouput
1234,ABCD,1/1/2000,1/1/2003
1234,DEFT,1/1/2003,1/1/2005
1234,ABCD,1/1/2005,1/1/2009
1234,DEFT,1/1/2009,12/31/9999
Thanks
code help
Moderators: chulett, rschirm, roy
What if you added a field for every key break:
1,1234,ABCD,1/1/2000,1/1/2001
1,1234,ABCD,1/1/2001,1/1/2002
1,1234,ABCD,1/1/2002,1/1/2003
2,1234,DEFT,1/1/2003,1/1/2005
3,1234,ABCD,1/1/2005,1/1/2007
3,1234,ABCD,1/1/2007,1/1/2009
4,1234,DEFT,1/1/2009,12/31/9999
Then Aggregate and use min and max functions
1,1234,ABCD,1/1/2000,1/1/2001
1,1234,ABCD,1/1/2001,1/1/2002
1,1234,ABCD,1/1/2002,1/1/2003
2,1234,DEFT,1/1/2003,1/1/2005
3,1234,ABCD,1/1/2005,1/1/2007
3,1234,ABCD,1/1/2007,1/1/2009
4,1234,DEFT,1/1/2009,12/31/9999
Then Aggregate and use min and max functions
Michael Gohl