Hi All,
I have the below requirement, please let me know your thoughts on this.
I have a table which contains the values for the pattern:
Store_id, Pattern, Flg, Start_Date, End_Date
123, 801, N, 20081101, 20081110
123, 802, N , 20081111, 20081125
123, 803, Y , 20081126, 99991231
One more store table contains storeid and start_date
123 , 20081115
All i need to do is check the start_date(20081115) which lies between any of the above start_date and End_Date values and get the corresponding pattern values.
Need your inputs on this.
Thanks.
DataRange comparision
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do your lookup using a database stage with user-defined SQL. Specify start_date as the Key column (it means "search key" in this context) and include the parameter marker in a BETWEEN clause in the WHERE clause.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.