我正在为我为其项目工作的公司制作一些自定义报告。
我已经逐月获得了一个项目的成本,并在excel表上显示。
但是,我很难找到Cube如何总结这些数据。
到目前为止,我已经有了这个:
declare @res_name as nvarchar(510)
declare @begin_date as datetime
declare @end_date as datetime
-- set these variables
select @res_name = 'Team Member'
select @begin_date = '2013-01-01'
select @end_date = '2013-12-31'
-- end variables
select
p.WPROJ_ID as Project_ID,
PROJ_NAME as Project,
month(ASSN_START_DATE) as StartMonth,
year(ASSN_START_DATE) as StartYear,
SUM(AssignmentActualCost) as Cost,
SUM(ASSN_ACT_WORK)/60000 as Assigned_Work,
SUM(ASSN_REM_WORK)/60000 as Remaining_Work
from
MSP_WEB_PROJECTS p,
MSP_WEB_ASSIGNMENTS a,
MSP_VIEW_PROJ_ASSN_STD vpa
where p.WPROJ_ID = 489
and a.WPROJ_ID = p.WPROJ_ID
and vpa.WPROJ_ID = p.WPROJ_ID
and ASSN_START_DATE Between @begin_date And @end_date
group by month(ASSN_START_DATE), year(ASSN_START_DATE), PROJ_NAME, p.WPROJ_ID
order by year(ASSN_START_DATE), month(ASSN_START_DATE)
它显示了一些数据,但它们与CUBE显示的非常不同。
我需要知道的是哪个表存储了有关已知任务或项目成本的信息,我不知道它是如何做到的。
提前感谢。