Hello
i have a holiday table with staff ID's and single entry dates (for holidays skipping weekends)
I need a crosstab to show the dates as the column, and the staff id as the row, and count the holidays respective to each person, so it will show a "1" or be empty, i want to be able to specify the range that the dates show (ie month by month) but i can only get it to header for dates where there is a holiday if that makes sense.
i have a table of dates which builds "from" and "to" to supply the headers
please help
Crosstab SQL so far
TRANSFORM Count(tbl_Holid ays.Date) AS CountOfDate
SELECT tbl_Holidays.St affID
FROM tbl_MDCodes, tbl_Holidays
WHERE (((tbl_Holidays .Date)=CDate([DCode] & "/" & [MCode] & "/" & [YCode])))
GROUP BY tbl_Holidays.St affID
PIVOT CDate([DCode] & "/" & [MCode] & "/" & [YCode]);
i have a holiday table with staff ID's and single entry dates (for holidays skipping weekends)
I need a crosstab to show the dates as the column, and the staff id as the row, and count the holidays respective to each person, so it will show a "1" or be empty, i want to be able to specify the range that the dates show (ie month by month) but i can only get it to header for dates where there is a holiday if that makes sense.
i have a table of dates which builds "from" and "to" to supply the headers
please help
Crosstab SQL so far
TRANSFORM Count(tbl_Holid ays.Date) AS CountOfDate
SELECT tbl_Holidays.St affID
FROM tbl_MDCodes, tbl_Holidays
WHERE (((tbl_Holidays .Date)=CDate([DCode] & "/" & [MCode] & "/" & [YCode])))
GROUP BY tbl_Holidays.St affID
PIVOT CDate([DCode] & "/" & [MCode] & "/" & [YCode]);
Comment