Advertisement
psi_mmobile

Untitled

Feb 24th, 2025
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.42 KB | None | 0 0
  1. SELECT Obs.OBS_ID,
  2.        obs.NAME AS long_name,        
  3.        obs.parent_obs_id,
  4.        obs.SHORT_NAME,
  5.        obs.REF_NUMBER,
  6.        obs.OBS_LEVEL,
  7.        NVL2 (short_name, short_name || ' ' || name, name) AS Name
  8. FROM obs obs
  9. WHERE vehicle_owner_id = ?
  10. AND ? IS NOT NULL
  11. START WITH  obs.parent_obs_id IS NULL
  12. CONNECT BY parent_obs_id = PRIOR obs.obs_id
  13. ORDER SIBLINGS BY obs.SHORT_NAME, name,  obs.REF_NUMBER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement