Advertisement
psi_mmobile

Untitled

Aug 30th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.78 KB | None | 0 0
  1. SELECT VoGroup.VO_GROUP_ID,
  2.        VoGroup.VEHICLE_OWNER_ID,
  3.        VoGroup.NAME,
  4.        VoGroup.GRAPHICAL_SYMBOL,
  5.        VoGroup.LM_COMMENT,
  6.        VoGroup.PARENT_VO_GROUP_ID,
  7.        VoGroup.COMPANY_NR
  8. FROM VO_GROUP VoGroup
  9. WHERE VoGroup.PARENT_VO_GROUP_ID IS NULL
  10. AND (VoGroup.VO_GROUP_ID IN (SELECT DISTINCT vo_group.parent_vo_group_id FROM vo_group, vo_group_person, gu_person
  11. WHERE vo_group.vo_group_id = vo_group_person.vo_group_id
  12. AND gu_person.person_id = vo_group_person.person_id
  13. AND gu_person.gui_user_id=?) OR VoGroup.VO_GROUP_ID IN (SELECT DISTINCT vo_group.parent_vo_group_id FROM vo_group, vo_group_vehicle, gu_vehicle
  14. WHERE vo_group.vo_group_id = vo_group_vehicle.vo_group_id
  15. AND gu_vehicle.vehicle_id = vo_group_vehicle.vehicle_id
  16. AND gu_vehicle.gui_user_id=?))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement