Hi, I have a projects table with projects that all have start dates and end dates in the same table
PROJECT
ID Project name start end
12 Grand sale 27sep2010 10oct2010
18 Sony clearout 14oct2010 15oct2010
...
TRADING PERIOD
ID Year T.P. week Week start week end year half
10 2010 9 35 26/09/2010 02/10/2010 2
11 2010 9 36 03/10/2010 09/10/2010 2
12 2010 9 37 10/10/2010 16/10/2010 2
...
Project trading period
Project ID trading period ID
12 10
12 11
12 12
18 12
....
I have a trading period table which is many-to-many relationship with the projects table, and this has been resolved 3rd table that has the ID (Project ID and Trading period ID) from both tables.
I have setup a function that loops through all projects and creates relationships between projects and trading periods if the project start/end dates overlap the week start/end dates of the T.P’s
I need to count all projects and allow the user to filter via year/half year/trading period/week#/week. After they type in criteria I need to send results to a temp table with option to export to excel
PROJECT
ID Project name start end
12 Grand sale 27sep2010 10oct2010
18 Sony clearout 14oct2010 15oct2010
...
TRADING PERIOD
ID Year T.P. week Week start week end year half
10 2010 9 35 26/09/2010 02/10/2010 2
11 2010 9 36 03/10/2010 09/10/2010 2
12 2010 9 37 10/10/2010 16/10/2010 2
...
Project trading period
Project ID trading period ID
12 10
12 11
12 12
18 12
....
I have a trading period table which is many-to-many relationship with the projects table, and this has been resolved 3rd table that has the ID (Project ID and Trading period ID) from both tables.
I have setup a function that loops through all projects and creates relationships between projects and trading periods if the project start/end dates overlap the week start/end dates of the T.P’s
I need to count all projects and allow the user to filter via year/half year/trading period/week#/week. After they type in criteria I need to send results to a temp table with option to export to excel