DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
manojbh31



Group memberships:
Premium Members

Joined: 21 Jun 2007
Posts: 83

Points: 711

Post Posted: Sat Sep 09, 2017 8:01 pm Reply with quote    Back to top    

DataStage® Release: 9x
Job Type: Parallel
OS: Unix
Hello all,

I have 5 records as below

Code:
Id      Date           End date
1234    2017-08-09     2017-08-10
1234    2017-08-10     2017-08-11
1234    2017-08-11     2017-08-12
1234    2017-08-12     2017-08-13
1234    2017-08-13     2099-12-31

I need to pick next record date value and populate in end date of old record as above, please help on how to implement this .
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42283
Location: Denver, CO
Points: 217108

Post Posted: Sat Sep 09, 2017 11:52 pm Reply with quote    Back to top    

Go in reverse order.

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
manojbh31



Group memberships:
Premium Members

Joined: 21 Jun 2007
Posts: 83

Points: 711

Post Posted: Sun Sep 10, 2017 5:39 am Reply with quote    Back to top    

Craig,

I am not getting you, please explain.
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42283
Location: Denver, CO
Points: 217108

Post Posted: Sun Sep 10, 2017 8:41 am Reply with quote    Back to top    

You can't do anything with the "previous" records unless we're talking a database as the target. I'm assuming we're talking about files here so the suggestion is to sort the data descending... i.e ...

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Timato
Participant



Joined: 30 Sep 2014
Posts: 24

Points: 152

Post Posted: Sun Sep 24, 2017 7:20 am Reply with quote    Back to top    

On the offchance you are sourcing from a database i'd suggest reading up on 'window' functions for your rdbms. Perfect for reconstructing SCDs (i assume...)
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours