Fetch records based on date range from reference table

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Shruthi
Participant
Posts: 74
Joined: Sun Oct 05, 2008 10:59 pm
Location: Bangalore

Fetch records based on date range from reference table

Post by Shruthi »

Hi.. I have the following scenario.

In the source, I have a date field named VALID_D.

In the reference DB2 table, I have the following columns CURRENT_DATE, FROM_DATE and TO_DATE. Primary key is CURRENT_DATE. We have entry for every day for 5 years.

I have to check if the VALID_D from source is between FROM_DATE and TO_DATE for current date.

How can this be achieved?

For now, am using a transfomer and generating a new column with current date value and then, using lookup, comparing the newly generated column and CURRENT_DATE.

Is there any stage in DS which can be used to check if the records fall between two date range?
Shruthi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not until you get version 8.0 or later.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Shruthi
Participant
Posts: 74
Joined: Sun Oct 05, 2008 10:59 pm
Location: Bangalore

Thanks

Post by Shruthi »

Thanks Ray. As the feature was available in other ETL tool and as am new to datastage, was wondering if there is such thing in Datastage also. Thanks agian.
Shruthi
Post Reply