Page 1 of 1

Extract Rolling 24 Months from Unidata Stage

Posted: Fri Apr 12, 2013 12:16 pm
by brownnt
I am trying to extract data from a Unidata database using the Unidata stage in DataStage for a 24 month rolling period based on a period end date. I have tried the below but it does not seem to be working properly.

UTM_PERIOD_END > @DATE -24

Posted: Fri Apr 12, 2013 2:47 pm
by ray.wurlod
Please clarify "not working".

@DATE is the system date that the query began executing, in internal format. So @DATE - 24 is the date 24 days before that (not 24 months).

You need a better technique, perhaps @YEAR - 2.