Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure unlinkWBSTaskdata(p_wbs_id in number) is
- cursor wbs_tasks_c is
- select wbs_task_id
- from wbs_task
- where wbs_id = p_wbs_id;
- begin
- for wbs_task_r in wbs_tasks_c loop
- update pd_trf_day set lm_date = SYSDATE, team_day_wbs_task_id = null
- where team_day_wbs_task_id in (select team_day_wbs_task_id from team_day_wbs_task where wbs_task_id = wbs_task_r.wbs_task_id);
- -- update pd_trf_day set lm_date = SYSDATE, wbs_id = null
- -- where wbs_id = p_wbs_id;
- update mf_owner.mw_time_sheet_line set lm_date = SYSDATE, team_day_wbs_task_id = null
- where team_day_wbs_task_id in (select team_day_wbs_task_id from team_day_wbs_task where wbs_task_id = wbs_task_r.wbs_task_id);
- delete from team_day_wbs_task
- where wbs_task_id = wbs_task_r.wbs_task_id;
- delete from wbs_task
- where wbs_task_id = wbs_task_r.wbs_task_id;
- commit;
- end loop;
- update wbs set lm_date = SYSDATE, wbs_status_id = 1
- where wbs_id = p_wbs_id;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement