J
Jesse
I'm querying from a sql 2k database...from a single take. I'm ok selecting
the data I want. I need to group the value of a calculated field....and I
don't know how to do this? The calculated field is to identify the status of
the entry for a project task (late to start, late to finish, etc). Here's my
query:
select proj_id, task_uid, task_id, task_name
task_start_date, task_dur, task_finish_date,
task_pct_comp, task_pct_work_comp
task_is_summary, task_is_milestone
from dbo.MSP_TASKS
where proj_id = 819
group by task_status
order by task_id
here's the pseudocode for the task_status calculated field:
([% Work Complete]=100 And [Finish]>[Current Date]-7) = "finished last week"
[% Work Complete]=100 = "finished"
([% Complete]=0 And [Start]>[Current Date]-1 And [Start]<[Current Date]+7) =
"start within 1 week"
([% Complete]=0 And [Current Date]>[Start]) = "late to start"
[% Complete]=0 = "not started"
([% Complete]>0 And [% Work Complete]<100 And [Current Date]>[Finish]) =
"late to finish"
([% Complete]>0 And [% Work Complete]<100) = "started")
Can someone help me to create and group by this calculated "status" field?
the data I want. I need to group the value of a calculated field....and I
don't know how to do this? The calculated field is to identify the status of
the entry for a project task (late to start, late to finish, etc). Here's my
query:
select proj_id, task_uid, task_id, task_name
task_start_date, task_dur, task_finish_date,
task_pct_comp, task_pct_work_comp
task_is_summary, task_is_milestone
from dbo.MSP_TASKS
where proj_id = 819
group by task_status
order by task_id
here's the pseudocode for the task_status calculated field:
([% Work Complete]=100 And [Finish]>[Current Date]-7) = "finished last week"
[% Work Complete]=100 = "finished"
([% Complete]=0 And [Start]>[Current Date]-1 And [Start]<[Current Date]+7) =
"start within 1 week"
([% Complete]=0 And [Current Date]>[Start]) = "late to start"
[% Complete]=0 = "not started"
([% Complete]>0 And [% Work Complete]<100 And [Current Date]>[Finish]) =
"late to finish"
([% Complete]>0 And [% Work Complete]<100) = "started")
Can someone help me to create and group by this calculated "status" field?