logic required
Posted: Thu Nov 04, 2010 11:51 am
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
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