Basic Example;-
select
projecttaskid,
projectid,
taskuniqueid,
billing_taskuniqueid,
task_id,
[Task Code],
Taskname,
[Charge Method],
Service,
[Resource Group],
[Task Leader],
[Start Date],
[Finish Date],
[Actual Start Date],
[Actual Finish Date],
[Forecast This Year],
[Forecast Next Year],
[Forecast Year 2],
[Forecast Year 3],
[Forecast Year 4],
[Client Fee],
[Currency Fee],
[Target Fee],
[Percentage Complete],
[Calc Percent Complete],
[Percentage Fee Earned],
[Scheduled Fee Earned],
[Fee Discounts WIP],
[Fees Earned],
[Hours To Date],
[Hours This Year],
[Hours In Progress],
[Time Recharges To Date],
[Time Recharges This Year],
[Time Recharges In Progress],
[Time Costs To Date],
[Time Costs This Year],
[Time Costs In Progress],
[Expense Costs To Date],
[Expense Costs This_Year],
[Expense Costs In Progress],
[Outsourced Costs To Date],
[Outsourced Costs This Year],
[Outsourced Costs In Progress],
[Timecharges Earned],
[Timecharges Earned This Year],
[Expenses Earned],
[Expenses Earned This Year],
[NC Expense Costs To Date],
[NC Expense Costs This Year],
[NC Expense Costs In Progress],
[Fees Invoiced],
[Fees Invoiced This Year],
[Time Invoiced],
[Time Invoiced This Year],
[Expenses Invoiced],
[Expenses Invoiced This Year],
[Fee Discounts Invoiced],
[Time Discounts Invoiced],
[Time Discounts WIP],
[Exps Discounts Invoiced],
[Fee Discounts Inv This Year],
[Time Discounts Inv This Year],
[Exps Discounts Inv This Year],
[Fees WIP],
[Timecharges WIP],
[Expenses WIP],
[Cost To Complete],
[Exps To Complete],
[Draft Fees Invoiced],
[Draft Time Invoiced],
[Draft Exps invoiced],
[Invoiced Time Writeoffs],
[WIP Time Writeoffs],
[Fees Deferred],
[Timecharges Deferred],
[Expenses Deferred],
[Outsourced Amount],
[Billingtask Time Costs To Date],
[Billingtask Hours To Date],
[Whatif Fee Invoices],
[Whatif Time Invoices],
[Whatif Exp Invoices],
[Resource Plan Cost To Complete],
[Resource Plan Hours To Complete],
[Resource Plan Cost],
[Resource Plan Hours]
from
vw_tasks_list
This lists all columns in the view. Columns can be removed as necessary. The last column name should not have a comma separator at the end of it.
Other Examples;-
The following are some examples how the data can be manipulated;-
Summarise the task values at a project level.
select
projectid,
Sum([Forecast This Year]) as [Forecast This Year],
Sum([Forecast Next Year]) as [Forecast Next Year],
Sum([Forecast Year 2]) as [Forecast Year 2],
Sum([Forecast Year 3]) as [Forecast Year 3],
Sum([Forecast Year 4]) as [Forecast Year 4],
Sum([Client Fee]) as [Client Fee],
Sum([Currency Fee]) as [Currency Fee],
Sum([Target Fee]) as [Target Fee],
Sum([Percentage Fee Earned]) as [Percentage Fee Earned],
Sum([Scheduled Fee Earned]) as [Scheduled Fee Earned],
Sum([Fee Discounts WIP]) as [Fee Discounts WIP],
Sum([Fees Earned]) as [Fees Earned],
Sum([Hours To Date]) as [Hours To Date],
Sum([Hours This Year]) as [Hours This Year],
Sum([Hours In Progress]) as [Hours In Progress],
Sum([Time Recharges To Date]) as [Time Recharges To Date],
Sum([Time Recharges This Year]) as [Time Recharges This Year],
Sum([Time Recharges In Progress]) as [Time Recharges In Progress],
Sum([Time Costs To Date]) as [Time Costs To Date],
Sum([Time Costs This Year]) as [Time Costs This Year],
Sum([Time Costs In Progress]) as [Time Costs In Progress],
Sum([Expense Costs To Date]) as [Expense Costs In Progress],
Sum([Expense Costs This_Year]) as [Expense Costs This_Year],
Sum([Expense Costs In Progress]) as [Expense Costs In Progress],
Sum([Outsourced Costs To Date]) as [Outsourced Costs To Date],
Sum([Outsourced Costs This Year]) as [Outsourced Costs This Year],
Sum([Outsourced Costs In Progress]) as [Outsourced Costs In Progress],
Sum([Timecharges Earned]) as [Timecharges Earned],
Sum([Timecharges Earned This Year]) as [Timecharges Earned This Year],
Sum([Expenses Earned]) as [Expenses Earned],
Sum([Expenses Earned This Year]) as [Expenses Earned This Year],
Sum([NC Expense Costs To Date]) as [NC Expense Costs To Date],
Sum([NC Expense Costs This Year]) as [NC Expense Costs This Year],
Sum([NC Expense Costs In Progress]) as [NC Expense Costs In Progress],
Sum([Fees Invoiced]) as [Fees Invoiced],
Sum([Fees Invoiced This Year]) as [Fees Invoiced This Year],
Sum([Time Invoiced]) as [Time Invoiced],
Sum([Time Invoiced This Year]) as [Time Invoiced This Year],
Sum([Expenses Invoiced]) as [Expenses Invoiced],
Sum([Expenses Invoiced This Year]) as [Expenses Invoiced This Year],
Sum([Fee Discounts Invoiced]) as [Fee Discounts Invoiced],
Sum([Time Discounts Invoiced]) as [Time Discounts Invoiced],
Sum([Time Discounts WIP]) as [Time Discounts WIP],
Sum([Exps Discounts Invoiced]) as [Exps Discounts Invoiced],
Sum([Fee Discounts Inv This Year]) as [Fee Discounts Inv This Year],
Sum([Time Discounts Inv This Year]) as [Time Discounts Inv This Year],
Sum([Exps Discounts Inv This Year]) as [Exps Discounts Inv This Year],
Sum([Fees WIP]) as [Fees WIP],
Sum([Timecharges WIP]) as [Timecharges WIP],
Sum([Expenses WIP]) as [Expenses WIP],
Sum([Cost To Complete]) as [Cost To Complete],
Sum([Exps To Complete]) as [Exps To Complete],
Sum([Draft Fees Invoiced]) as [Draft Fees Invoiced],
Sum([Draft Time Invoiced]) as [Draft Time Invoiced],
Sum([Draft Exps invoiced]) as [Draft Exps invoiced],
Sum([Invoiced Time Writeoffs]) as [Invoiced Time Writeoffs],
Sum([WIP Time Writeoffs]) as [WIP Time Writeoffs],
Sum([Fees Deferred]) as [Fees Deferred],
Sum([Timecharges Deferred]) as [Timecharges Deferred],
Sum([Expenses Deferred]) as [Expenses Deferred],
Sum([Outsourced Amount]) as [Outsourced Amount],
Sum([Billingtask Time Costs To Date]) as [Billingtask Time Costs To Date],
Sum([Billingtask Hours To Date]) as [Billingtask Hours To Date],
Sum([Whatif Fee Invoices]) as [Whatif Fee Invoices],
Sum([Whatif Time Invoices]) as [Whatif Time Invoices],
Sum([Whatif Exp Invoices]) as [Whatif Exp Invoices],
Sum([Resource Plan Cost To Complete]) as [Resource Plan Cost To Complete],
Sum([Resource Plan Hours To Complete]) as [Resource Plan Hours To Complete],
Sum([Resource Plan Cost]) as [Resource Plan Cost],
Sum([Resource Plan Hours]) as [Resource Plan Hours]
from
vw_tasks_list
group by
projectid
|