select pm_task__new_task_item ( null, :project_item_id, '$task_title($i)', '$description($i)', [project_manager::project::util::datenvl -value [set end_date_$i] -value_if_null "null," -value_if_not_null "to_timestamp('[set end_date_$i]','YYYY MM DD HH24 MI SS'),"] '0', '$estimated_hours_work($i)', '$estimated_hours_work_min($i)', '$estimated_hours_work_max($i)', current_timestamp, :user_id, :peeraddr, :package_id ); select pm_task__new_task_revision ( '$task_item_id($i)', :project_item_id, '$task_title($i)', '$description($i)', [project_manager::project::util::datenvl -value [set end_date_$i] -value_if_null "null," -value_if_not_null "to_timestamp('[set end_date_$i]','YYYY MM DD HH24 MI SS'),"] '$percent_complete($i)', '$estimated_hours_work($i)', '$estimated_hours_work_min($i)', '$estimated_hours_work_max($i)', '$actual_hours_worked($i)', current_timestamp, :user_id, :peeraddr, :package_id ); select current_timestamp FROM dual select t.task_revision_id, t.title as task_title, t.item_id, t.description, t.name, to_char(t.end_date,'YYYY MM DD') as end_date, t.percent_complete, t.estimated_hours_work, t.estimated_hours_work_min, t.estimated_hours_work_max, d.parent_task_id, t.actual_hours_worked FROM pm_tasks_revisionsx t, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id WHERE t.item_id in ([join $task_id ","]) and t.revision_id = i.live_revision 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