Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT Obs.OBS_ID,
- obs.NAME AS long_name,
- obs.parent_obs_id,
- obs.SHORT_NAME,
- obs.REF_NUMBER,
- obs.OBS_LEVEL,
- NVL2 (short_name, short_name || ' ' || name, name) AS Name
- FROM obs obs
- WHERE vehicle_owner_id = ?
- AND ? IS NOT NULL
- START WITH obs.parent_obs_id IS NULL
- CONNECT BY parent_obs_id = PRIOR obs.obs_id
- ORDER SIBLINGS BY obs.SHORT_NAME, name, obs.REF_NUMBER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement