SELECT
p.item_id as project_item_id
FROM
pm_projectsx p
WHERE
p.project_id = :project_id
SELECT
p.project_id
FROM
pm_projectsx p, cr_items i
WHERE
p.item_id = :project_item_id and
p.revision_id = i.live_revision
SELECT
p.item_id,
p.project_id,
p.title as project_name,
p.project_code,
p.goal,
p.description,
to_char(p.planned_start_date,'YYYY-MM-DD HH24:MI') as planned_start_date,
to_char(p.planned_end_date,'YYYY-MM-DD HH24:MI') as planned_end_date,
p.ongoing_p,
i.live_revision,
to_char(p.estimated_finish_date,'YYYY-MM-DD HH24:MI') as estimated_finish_date,
to_char(p.earliest_finish_date,'YYYY-MM-DD HH24:MI') as earliest_finish_date,
to_char(p.latest_finish_date,'YYYY-MM-DD HH24:MI') as latest_finish_date,
p.actual_hours_completed,
p.estimated_hours_total,
p.parent_id
FROM
pm_projectsx p, cr_items i
WHERE
p.item_id = :project_item_id and
p.project_id = :project_id and
p.item_id = i.item_id
SELECT
p.item_id,
p.project_id,
p.title as project_name,
p.project_code,
p.goal,
p.description,
to_char(p.planned_start_date,'Mon DD') as planned_start_date,
to_char(p.planned_end_date,'Mon DD') as planned_end_date,
p.ongoing_p,
i.live_revision,
to_char(p.estimated_finish_date,'Mon DD') as estimated_finish_date,
to_char(p.earliest_finish_date,'Mon DD') as earliest_finish_date,
to_char(p.latest_finish_date,'Mon DD') as latest_finish_date,
p.estimated_hours_total
FROM
pm_projectsx p, cr_items i
WHERE
p.item_id = :project_item_id and
p.item_id = i.item_id
ORDER BY
p.project_id desc
SELECT
t.item_id as task_id,
t.title,
to_char(t.end_date,'YYYY-MM-DD HH24:MI') as end_date,
to_char(t.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start,
t.earliest_start - current_date as days_to_earliest_start,
to_char(t.earliest_start,'J') as earliest_start_j,
to_char(t.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish,
t.earliest_finish - current_date as days_to_earliest_finish,
to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
t.latest_start - current_date as days_to_latest_start,
to_char(t.latest_start,'J') as latest_start_j,
to_char(current_date,'J') as today_j,
to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
t.latest_finish - current_date as days_to_latest_finish,
u.first_names,
u.last_name,
t.percent_complete,
d.parent_task_id,
d.dependency_type,
t.estimated_hours_work,
t.estimated_hours_work_min,
t.estimated_hours_work_max,
t.actual_hours_worked
FROM
(select * from pm_tasks_revisionsx LEFT JOIN pm_task_assignment ON item_id = task_id) t LEFT JOIN persons u ON t.party_id = u.person_id, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id
WHERE
t.parent_id = :project_item_id and
t.revision_id = i.live_revision
[template::list::orderby_clause -name tasks -orderby]
select pm_project__get_root_folder (:package_id, 'f')
SELECT
p.item_id,
p.project_id,
p.parent_id as folder_id,
p.object_type as content_type,
p.title as project_name,
p.project_code,
to_char(p.planned_start_date, 'Mon DD') as planned_start_date,
to_char(p.planned_end_date, 'Mon DD') as planned_end_date,
p.ongoing_p,
p.actual_hours_completed,
p.estimated_hours_total
FROM pm_projectsx p, cr_items i
WHERE p.project_id = i.live_revision and
p.parent_id = :project_item_id
ORDER BY p.title
select
project_id,
role_id,
party_id
from pm_project_assignment
where project_id = :project_item_id
SELECT
p.customer_id
FROM
pm_projectsx p
LEFT JOIN organizations c ON p.customer_id = c.organization_id
WHERE
p.project_id = :original_project_id