Advertisement
psi_mmobile

Untitled

Sep 16th, 2019
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. case work_code_std.work_code_std_category_id
  2. when 2 then null
  3. else decode (RANK() OVER (PARTITION BY pd_day.pd_day_id ORDER BY decode(DECODE(short_code,'HRP_N','UR','HRP_D','UR', 'HRP_NWCO','UR','HS','OU',short_code), 'UR', 1, 2), pd_trf_day_id), 1,
  4. nvl2 (NULLIF(pd_day.declared_vehicle_km, 0), 'G', nvl2(NULLIF(pd_day.declared_bicycle_km,0), 'F', nvl2 (NULLIF(pd_day.declared_private_km,0), 'P', null))), null)
  5. end as mob_code,
  6. case work_code_std.work_code_std_category_id
  7. when 2 then null
  8. else decode (RANK() OVER (PARTITION BY pd_day.pd_day_id ORDER BY decode(DECODE(short_code,'HRP_N','UR','HRP_D','UR', 'HRP_NWCO','UR','HS','OU',short_code), 'UR', 1, 2), pd_trf_day_id), 1,
  9. nvl (NULLIF(pd_day.declared_vehicle_km,0), nvl (NULLIF(pd_day.declared_bicycle_km, 0), NULLIF(pd_day.declared_private_km, 0))), null)
  10. end as KM,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement