Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --default store place
- SELECT esp.equipment_store_place_id,esp.company_nr,esp.name,esp.description,v.company_nr vehicle_company_nr,op.name poi_name,vo.company_name
- FROM equipment_store_place esp, vehicle v, oc_poi op, vehicle_owner vo
- WHERE esp.vehicle_id = v.vehicle_id(+)
- AND esp.oc_poi_id=op.poi_id(+)
- AND esp.vehicle_owner_id = vo.vehicle_owner_id
- AND vo.vehicle_owner_id = ?
- ORDER BY 2;
- --default poi tin / wbs
- SELECT P_WBS.getWbsName(Wbs.WBS_ID, VGuiUserOcPoi.POI_ID) AS WBS_NAME,
- Wbs.WBS_ID,
- wbs.poi_tin,
- wbs.poi_id
- FROM V_GUI_USER_OC_POI VGuiUserOcPoi, WBS Wbs
- WHERE (VGuiUserOcPoi.POI_ID = Wbs.POI_ID)
- AND (Wbs.WBS_LEVEL IS NULL OR Wbs.WBS_LEVEL=1 OR (Wbs.WBS_LEVEL=0 AND NOT EXISTS (SELECT w.wbs_id FROM WBS w WHERE w.wbs_level=1 AND w.poi_id=Wbs.poi_id)))
- AND VGuiUserOcPoi.GUI_USER_ID = ?
- AND VGuiUserOcPoi.oc_poi_status_id = 0
- AND wbs.wbs_id IS NOT NULL
- AND wbs.poi_tin IS NOT NULL
- UNION
- SELECT (Wbs.NAME || ' ' || Wbs.REF_NUMBER) AS WBS_NAME,
- Wbs.WBS_ID,
- NULL,
- NULL
- FROM WBS Wbs, GUI_USERS GuiUsers
- WHERE Wbs.operation_center_id = GuiUsers.operation_center_id
- AND Wbs.is_project = 'Y'
- AND Wbs.wbs_status_id = 0
- AND GuiUsers.gui_user_id = ?
- AND wbs.name NOT LIKE 'Template%'
- ORDER BY WBS_NAME;
- --qualification
- SELECT q2.qualification_id,
- q1.short_code group_code,
- q1.name group_name,
- q2.short_code qualification_code,
- q2.name qualification_name, TRIM(q2.short_code || ' ' || q2.name) qualification
- FROM qualification q1, qualification q2
- WHERE q1.vehicle_owner_id = ?
- AND q1.qualification_id = q2.parent_qualification_id
- AND NVL(q1.is_active,'Y') = 'Y'
- AND NVL(q2.is_active,'Y') = 'Y'
- ORDER BY q1.order_num, group_code, group_name, q2.order_num, qualification_code, qualification_name;
- -- hiring point
- SELECT VGuiUserOcPoi.poi_id, vpc.vo_person_category_id, VGuiUserOcPoi.name, VGuiUserOcPoi.short_name
- FROM V_GUI_USER_OC_POI VGuiUserOcPoi, vo_person_category vpc
- WHERE
- VGuiUserOcPoi.oc_poi_category_id = vpc.hiring_p_oc_poi_category_id
- AND VGuiUserOcPoi.OC_POI_STATUS_ID IN (0,3)
- AND (VGuiUserOcPoi.gui_user_id = ?)
- ORDER BY name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement