Page 1 of 1

Implementing Greatest,Least Function in Datastage

Posted: Wed Nov 29, 2006 5:21 am
by srini.dw
Hi,

How can findout among 5 date columns Greatest Date,Least Date in DataSatge7.5 PX

Posted: Wed Nov 29, 2006 5:39 am
by Raghavendra
Convert the dates to julian date and compare them..

Posted: Wed Nov 29, 2006 5:54 am
by keshav0307
is the aggregate function for min and max, not working???

then sort the data, 1st is the least and last is the Greatest.

Posted: Wed Nov 29, 2006 6:42 am
by srini.dw
I need Like this

GDate=Greatest(Date1,Date2,Date3,Date4,Date5)
LDate=Least(Date1,Date2,Date3,Date4,Date5)


How Can do that in DataStage PX

Posted: Wed Nov 29, 2006 6:57 am
by srini.dw
I have Columns in redord coming as Gdate1,Gdate2,Gdate3,Gdate4,Gdate5 in that find out Gdate this is Greatest one.Like that for Ldate1,Ldate2,Ldate3,Ldate4,Ldate5 in that find out Ldate.

Posted: Wed Nov 29, 2006 7:27 am
by keshav0307
GDate=Max(Max(Max(Max(Date1,Date2),Date3),Date4),Date5)