Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT P_WBS.getWbsName(Wbs.WBS_ID, VGuiUserOcPoi.POI_ID) AS NAME,
- VGuiUserOcPoi.POI_ID,
- Wbs.WBS_ID,
- Wbs.REF_NUMBER
- FROM V_GUI_USER_OC_POI VGuiUserOcPoi, WBS Wbs
- WHERE VGuiUserOcPoi.OC_POI_STATUS_ID = 0
- and (VGuiUserOcPoi.oc_poi_category_id = ? or ? = -1)
- AND (VGuiUserOcPoi.POI_ID = Wbs.POI_ID(+))
- and (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 nvl (VGuiUserOcPoi.is_home_poi_category, 'N') = 'N'
- ORDER BY name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement