View Single Post
Old 12-03-2008, 05:23 AM   #6
kevisull
Registered User
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
kevisull is on a distinguished road
Re: Crosstab Query Column Headings

here is the current code if you can adjust it to work i can paste it in but that is my extent of doing code

TRANSFORM Sum(tbl_DB_Supply_Demand_Reporting.HOURS) AS SumOfHOURS
SELECT tbl_DB_Supply_Demand_Reporting.DATA_TYPE, tbl_DB_Supply_Demand_Reporting.DATA_ID, tbl_DB_Supply_Demand_Reporting.USERNAME, tbl_DB_Supply_Demand_Reporting.LOGON_IDENTIFIER, tbl_DB_Supply_Demand_Reporting.EMPLOYEE_TYPE, tbl_DB_Supply_Demand_Reporting.MANAGER_USER_NAME, tbl_DB_Supply_Demand_Reporting.ePRO_STATUS, tbl_DB_Supply_Demand_Reporting.ePRO_CATEGORY, tbl_DB_Supply_Demand_Reporting.CLIENT_ID, tbl_DB_Supply_Demand_Reporting.CLIENT_NAME, tbl_DB_Supply_Demand_Reporting.[DEMAND RSC POOL], tbl_DB_Supply_Demand_Reporting.[SUPPLY RSC POOL], tbl_DB_Supply_Demand_Reporting.ORGANIZATION, tbl_DB_Supply_Demand_Reporting.FUNCTION, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_ID, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_NAME, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_START_DA TE, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_END_DATE , tbl_DB_Supply_Demand_Reporting.PROJECT_ID, tbl_DB_Supply_Demand_Reporting.PROJECT_NAME, tbl_DB_Supply_Demand_Reporting.PROJECT_CATEGORY, tbl_DB_Supply_Demand_Reporting.SKILL_NAME, tbl_DB_Supply_Demand_Reporting.STAFFED_STATUS, tbl_DB_Supply_Demand_Reporting.RESOURCE_POOL, tbl_DB_Supply_Demand_Reporting.UNIT, tbl_DB_Supply_Demand_Reporting.OPS_CLIENT_FOCUS_TE AM, Sum(tbl_DB_Supply_Demand_Reporting.HOURS) AS [Total Of HOURS]
FROM tbl_DB_Supply_Demand_Reporting
GROUP BY tbl_DB_Supply_Demand_Reporting.DATA_TYPE, tbl_DB_Supply_Demand_Reporting.DATA_ID, tbl_DB_Supply_Demand_Reporting.USERNAME, tbl_DB_Supply_Demand_Reporting.LOGON_IDENTIFIER, tbl_DB_Supply_Demand_Reporting.EMPLOYEE_TYPE, tbl_DB_Supply_Demand_Reporting.MANAGER_USER_NAME, tbl_DB_Supply_Demand_Reporting.ePRO_STATUS, tbl_DB_Supply_Demand_Reporting.ePRO_CATEGORY, tbl_DB_Supply_Demand_Reporting.CLIENT_ID, tbl_DB_Supply_Demand_Reporting.CLIENT_NAME, tbl_DB_Supply_Demand_Reporting.[DEMAND RSC POOL], tbl_DB_Supply_Demand_Reporting.[SUPPLY RSC POOL], tbl_DB_Supply_Demand_Reporting.ORGANIZATION, tbl_DB_Supply_Demand_Reporting.FUNCTION, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_ID, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_NAME, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_START_DA TE, tbl_DB_Supply_Demand_Reporting.STAFF_PROF_END_DATE , tbl_DB_Supply_Demand_Reporting.PROJECT_ID, tbl_DB_Supply_Demand_Reporting.PROJECT_NAME, tbl_DB_Supply_Demand_Reporting.PROJECT_CATEGORY, tbl_DB_Supply_Demand_Reporting.SKILL_NAME, tbl_DB_Supply_Demand_Reporting.STAFFED_STATUS, tbl_DB_Supply_Demand_Reporting.RESOURCE_POOL, tbl_DB_Supply_Demand_Reporting.UNIT, tbl_DB_Supply_Demand_Reporting.OPS_CLIENT_FOCUS_TE AM
PIVOT tbl_DB_Supply_Demand_Reporting.FTE_DATE_YM In ("Month 1","Month 2","Month 3","Month 4","Month 5","Month 6","Month 7","Month 8","Month 9","Month 10","Month 11","Month 12");
kevisull is offline   Reply With Quote