Fetch records based on date range from reference table
Posted: Tue Dec 09, 2008 8:04 pm
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?
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?