Advertisement
gsemmobile

Untitled

Jun 21st, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.15 KB | None | 0 0
  1. SELECT v.vehicle_id, v.REMOTE_UNIT_ID, v.VEHICLE_OWNER_ID,
  2.         v.person_id, v.NUMBERPLATE, v.COMPANY_NR,
  3.         v.COLOR, v.BRAND, v.MODEL,
  4.         v.DOOR, v.FUEL, v.RU_INSTALL_DATE,
  5.         v.LM_COMMENT, v.VO_VEHICLE_CATEGORY_ID,
  6.         ru.IMEI, ru.MSISDN, ru.MSISDN_DATA,
  7.         ru.REMOTE_UNIT_TYPE_ID, ru.SERIAL_NUMBER, ru.SIM_NR,
  8.         oc_et.GRAPHICAL_SYMBOL,
  9.         vo.COMPANY_NAME, vo.VEHICLE_OWNER_ID,
  10.         vovc.NAME, gui.GUI_USER_ID, vovc.GRAPHICAL_SYMBOL, decode(ru.is_container, 'Y',  'is a containter', 'not a container') Container, oc_et.str_id,
  11.         initcap(gui.first_name || ' ' || gui.last_name) Name_Person, vd.gps_full_date
  12. FROM vehicle v, remote_unit ru, oc_event_type oc_et, vehicle_owner vo, vo_vehicle_category vovc,
  13.         gui_users gui, admin_center ac, operation_center oc, vehicle_data vd, str str
  14. WHERE ru.remote_unit_id = vd.remote_unit_id
  15. AND vd.vehicle_data_id = v.last_vehicle_data_id
  16. AND v.vehicle_owner_id = vo.vehicle_owner_id
  17. AND vo.vehicle_owner_id = vovc.vehicle_owner_id
  18. AND vovc.vo_vehicle_category_id = v.vo_vehicle_category_id
  19. AND oc_et.operation_center_id = oc.operation_center_id
  20. AND oc_et.str_id = str.str_id
  21. AND gui_user_id = 101712
  22. ORDER BY vd.gps_full_date;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement