Hi
I have an requirment seems to be simple but stuck up with logic.
its like
i/p:
col1 col2 col3 col4(date) col5(date) col6
a b c 2010-10-20 9999-12-31 e
a b c 2010-10-21 9999-12-31 e
a b c 2010-10-22 9999-12-31 e
a b c 2010-10-23 9999-12-31 e
o/p1:
col1 col2 col3 col4(date) col5(date) col6
a b c 2010-10-23 9999-12-31 e
o/p2:
col1 col2 col3 col4(date) col5(date) col6
a b c 2010-10-20 9999-12-31 e
a b c 2010-10-21 9999-12-31 e
a b c 2010-10-22 9999-12-31 e
i need to take to record with latest effective date.
i have used followin approch:
used db(src)
|
db(src)-----aggr-----join-------records with max dt
above approch is giving me error lin agg stage as it map calculation max_DT as double datatype and hence type conversion errore
can you plesse guide me to acheive same
thanks in advance
logic required
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
I'm not sure if i'm missing something here. As far as I understood your requirement, you can try the below approach.
If your source is database, select all your rows and in a separate stage select the max of date from the same source table. Use a look-up and pass the row to target which matches and use a reject link to capture all other rows.
If your source is database, select all your rows and in a separate stage select the max of date from the same source table. Use a look-up and pass the row to target which matches and use a reject link to capture all other rows.
Arun
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
Re: logic required
Would setting the property Preserve Type = True on the Column for Calculation solve this part of the problem?devesh_ssingh wrote: above approch is giving me error lin agg stage as it map calculation max_DT as double datatype and hence type conversion errore
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
-
- Participant
- Posts: 91
- Joined: Wed Apr 20, 2005 7:59 pm
- Location: U.S.
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne