psi_mmobile

Untitled

Jun 29th, 2026
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. select
  2. vo.company_name,
  3. wc.work_code_name,
  4. wc.short_code,
  5. wcs.work_code_std_id || ' ' || wcs.description std_id_description,
  6. wc.order_num,
  7. wc.graphical_symbol,
  8. wc.is_active,
  9. wc.lm_date,
  10. wc.lm_name,
  11. wc.description,
  12. wcst.name work_code_std_type,
  13. wcsc.name work_code_std_category,
  14. wc.work_code_id,
  15. wc.vehicle_owner_id,
  16. wc.work_code_std_id
  17. from work_code wc, vehicle_owner vo, work_code_std_category wcsc, work_code_std_type wcst, work_code_std wcs, gui_users gu
  18. where wc.vehicle_owner_id = vo.vehicle_owner_id
  19. and wc.work_code_std_type_id = wcst.work_code_std_type_id(+)
  20. and wc.work_code_std_category_id = wcsc.work_code_std_category_id(+)
  21. and wc.work_code_std_id = wcs.work_code_std_id(+)
  22. and vo.vehicle_owner_status_id = 0
  23. and nvl(wc.is_active,'Y') = 'Y'
  24. and vo.default_operation_center_id != gu.operation_center_id
  25. and gu.gui_user_id = :gui_user_id
  26. and not exists (
  27. select 1
  28. from work_code wcex, vehicle_owner voex
  29. where wcex.vehicle_owner_id = voex.vehicle_owner_id
  30. and voex.default_operation_center_id = gu.operation_center_id
  31. and wcex.work_code_std_id = wc.work_code_std_id
  32. and wcex.work_code_std_id not in (996, 997, 998, 999)
  33. and nvl(wcex.is_active, 'Y') = 'Y'
  34. )
  35. order by vo.company_name, wc.order_num
Advertisement
Add Comment
Please, Sign In to add comment