oracle8.0
SELECT live_revision
FROM cr_items
WHERE item_id = :project_item_id
SELECT i.item_id
FROM cr_items i,
cr_revisions r
WHERE i.item_id = r.item_id and
r.revision_id = :project_id
select status_id
from pm_project_status
where status_type = 'o' and
rownum = 1
select status_id
from pm_project_status
where status_type = 'c' and
rownum = 1
begin
:1 := pm_project.new_project_item (
p_project_name => :project_name,
p_project_code => :project_code,
p_parent_id => :parent_id,
p_goal => :goal,
p_description => :description,
p_mime_type => :mime_type,
p_planned_start_date => to_date(:planned_start_date,'YYYY MM DD HH24 MI SS'),
p_planned_end_date => to_date(:planned_end_date,'YYYY MM DD HH24 MI SS'),
p_actual_start_date => null,
p_actual_end_date => null,
p_logger_project => :logger_project,
p_ongoing_p => :ongoing_p,
p_status_id => :status_id,
p_customer_id => :organization_id,
p_creation_user => :creation_user,
p_creation_ip => :creation_ip,
p_package_id => :package_id
);
end;
SELECT i.item_id,
i.content_type
FROM cr_items i,
pm_tasks_active t
WHERE i.item_id = t.task_id and
i.parent_id = :project_item_id
select sum(t.actual_hours_worked) as actual_hours_completed,
sum(t.estimated_hours_work) as estimated_hours_total,
to_char(current_timestamp,'J') as today_j
from pm_tasks_revisionsx t,
cr_items i,
pm_tasks_active a
where i.item_id = a.task_id and
t.item_id in ([join $task_list ", "]) and
i.live_revision = t.revision_id
SELECT case when t.actual_hours_worked is null then 0
else t.actual_hours_worked end as worked,
t.estimated_hours_work as to_work,
t.item_id as my_iid,
to_char(end_date,'J') as task_deadline_j,
to_char(earliest_start,'J') as old_earliest_start_j,
to_char(earliest_finish,'J') as old_earliest_finish_j,
to_char(latest_start,'J') as old_latest_start_j,
to_char(latest_finish,'J') as old_latest_finish_j,
t.percent_complete as my_percent_complete,
s.status_type
from pm_tasks_revisionsx t,
cr_items i,
pm_tasks_active ti,
pm_task_status s
where t.item_id in ([join $task_list ", "]) and
i.live_revision = t.revision_id and
i.item_id = ti.task_id and
ti.status = s.status_id
SELECT d.dependency_id,
d.task_id as task_item_id,
d.parent_task_id,
d.dependency_type
FROM pm_task_dependency d
WHERE d.task_id in ([join $task_list ", "])
SELECT to_char(planned_start_date,'J') as start_date_j,
to_char(planned_end_date,'J') as end_date_j,
ongoing_p
FROM pm_projects
WHERE project_id = (select live_revision from cr_items where item_id = :project_item_id)
UPDATE pm_projects
SET actual_hours_completed = :actual_hours_completed,
estimated_hours_total = :estimated_hours_total,
earliest_finish_date = :max_earliest_finish,
latest_finish_date = :min_latest_start
WHERE project_id = (select live_revision from cr_items where item_id = :project_item_id)
select parent_id
from cr_items
where item_id = :my_item_id
select pm_project.get_root_folder (:package_id, 'f') from dual
UPDATE pm_tasks_revisions
SET earliest_start = :es,
earliest_finish = :ef,
latest_start = :ls,
latest_finish = :lf
WHERE task_revision_id = (select live_revision from cr_items where item_id = :task_item)
SELECT
party_id
FROM
pm_project_assignment
WHERE
project_id = :project_item_id and
party_id = :party_id
LIMIT 1