I have a table with a date stamp on it. [tblDistLearnTra ck]
And a table with date ranges on it. [tblPayMonths]
What i want to do is join the two tables together and pull in the relevant pay month where the created date falls in between the date ranges.
So i am hoping to see results like this:
Does anyone have any ideas?
Code:
unique_id dist_created_date 1 01/06/2008 2 01/06/2008 3 05/06/2008 4 22/06/2008
Code:
month_id start_date end_date pay_month 07-APRMAY08 20/05/2008 19/06/2008 JUN-08 07-MAYJUN08 20/06/2008 19/07/2008 JUL-08 07-JUNJUL08 20/07/2008 19/08/2008 AUG-08
So i am hoping to see results like this:
Code:
unique_id dist_created_date pay_month 1 01/06/2008 JUN-08 2 01/06/2008 JUN-08 3 05/06/2008 JUN-08 4 22/06/2008 JUL-08
Comment