Extract Rolling 24 Months from Unidata Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
brownnt
Premium Member
Premium Member
Posts: 21
Joined: Tue Feb 03, 2009 6:07 pm

Extract Rolling 24 Months from Unidata Stage

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply