Advertisement
psi_mmobile

Untitled

Jun 30th, 2021
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 1.19 KB | None | 0 0
  1. SELECT kc.person_id,kc.vehicle_owner_id,vfuc.vehicle_owner_id FROM
  2. (SELECT person_id FROM person p, vo_person_category vopc
  3. WHERE p.vo_person_category_id = vopc.vo_person_category_id
  4. AND vopc.vehicle_owner_id = 101380
  5. AND p.person_status_id = 0) mjppl,
  6. key_code kc, vehicle_data vd, remote_unit ru, fixed_unit fu, vo_fixed_unit_category vfuc
  7. WHERE mjppl.person_id = kc.person_id
  8. AND kc.key_string = vd.driver_identifier
  9. AND vd.remote_unit_id = ru.remote_unit_id
  10. AND ru.remote_unit_id = fu.remote_unit_id
  11. AND fu.vo_fixed_unit_category_id = vfuc.vo_fixed_unit_category_id;
  12.  
  13. SELECT kc.person_id,kc.vehicle_owner_id,vfuc.vehicle_owner_id FROM
  14. (SELECT person_id FROM person p, vo_person_category vopc
  15. WHERE p.vo_person_category_id = vopc.vo_person_category_id
  16. AND vopc.vehicle_owner_id = 101380
  17. AND p.person_status_id = 0) mjppl,
  18. key_code kc, vehicle_data vd, remote_unit ru, fixed_unit fu, vo_fixed_unit_category vfuc
  19. WHERE mjppl.person_id = kc.person_id
  20. AND kc.key_string = vd.driver_identifier
  21. AND vd.remote_unit_id = ru.remote_unit_id
  22. AND ru.remote_unit_id = fu.remote_unit_id
  23. AND fu.vo_fixed_unit_category_id = vfuc.vo_fixed_unit_category_id
  24. AND vfuc.vehicle_owner_id <> kc.vehicle_owner_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement