Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT ccp.cal_closing_period_id, ccp.oc_calendar_id,
- date_to_milliseconds(toutcdate(ccp.from_date, NVL(oc.timezone, 'Europe/Brussels'))) from_date,
- date_to_milliseconds(toutcdate(ccp.TO_DATE, NVL(oc.timezone, 'Europe/Brussels'))) TO_DATE,
- wc.work_code_id, NVL(ccp.name, wc.short_code || ' - ' || wc.work_code_name) name, ccp.color ccp_color,
- wc.color wc_color, ccp.cal_closing_period_status_id, p.person_id, ccp.planning_comment, ccp.ccp_absence_certificate_status_id,
- ccp.lm_name, ccp.wbs_id
- FROM cal_closing_period ccp, person p, gu_person gp, gui_users gu, work_code wc, operation_center oc
- WHERE (gu.gui_user_id = :gui_user_id OR gu.profiled_person_id = :user_person_id)
- AND (:person_id IS NULL AND gp.gui_user_id IS NOT NULL OR NVL(:person_id, :user_person_id) IS NOT NULL)
- AND gu.gui_user_id = gp.gui_user_id
- AND oc.operation_center_id = gu.operation_center_id
- AND p.person_id = gp.person_id
- AND p.person_id = NVL(:person_id, p.person_id)
- AND gp.caw_limited IS NULL
- AND ccp.work_code_id = wc.work_code_id
- AND p.person_status_id = 0
- AND p.oc_calendar_id = ccp.oc_calendar_id
- AND ccp.from_date <= touserdate(date_from_milliseconds(:TO_DATE), NVL(oc.timezone, 'Europe/Brussels'))
- AND ccp.TO_DATE >= touserdate(date_from_milliseconds(:from_date), NVL(oc.timezone, 'Europe/Brussels'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement