Advertisement
psi_mmobile

Untitled

Mar 2nd, 2021
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. SELECT DISTINCT v.vehicle_id,
  2. v.company_nr,
  3. v.numberplate,
  4. v.brand,
  5. v.model,
  6. v.color,
  7. v.lm_comment,
  8. vc.name,
  9. v.chassis_nr,
  10. vo.company_name,
  11. vc.graphical_symbol,
  12. v.in_service_date,
  13. v.out_service_date,
  14. v.detailed_description,
  15. vd.total_distance,
  16. vd.rg_location,
  17. vd.rg_post_code,
  18. vd.rg_street,
  19. vd.rg_street_nr,
  20. rg_country,
  21. vs.name,
  22. esp.name,
  23. esp.equipment_store_place_id,
  24. LISTAGG(kc.key_string, ',') WITHIN GROUP (ORDER BY key_string) AS key_code_strings
  25. -- ,
  26. -- kc.key_string,
  27. -- kc.key_code_usage_id
  28. FROM equipment_store_place esp,
  29. vehicle_owner vo,
  30. VO_VEHICLE_CATEGORY vc,
  31. VEHICLE v,
  32. vehicle_status vs,
  33. vehicle_data vd,
  34. gu_vehicle gv,
  35. gui_users gu,
  36. key_code kc
  37. WHERE gu.gui_user_id = gv.gui_user_id
  38. and gv.vehicle_id = v.vehicle_id
  39. and v.vo_vehicle_category_id = vc.vo_vehicle_category_id
  40. and v.vehicle_status_id=vs.vehicle_status_id(+)
  41. and vc.vehicle_owner_id = vo.vehicle_owner_id
  42. --and nvl(vc.is_active,'Y') = 'Y'
  43. and v.last_vehicle_data_id = vd.vehicle_data_id(+)
  44. --and nvl(v.vehicle_status_id,0) = 0
  45. and v.last_equipment_store_place_id = esp.equipment_store_place_id
  46. and v.vehicle_id = kc.key_code_id
  47. AND v.vehicle_id = 118312--121352 118312
  48. AND gv.gui_user_id = 102737
  49. group by v.vehicle_id,
  50. v.company_nr,
  51. v.numberplate,
  52. v.brand,
  53. v.model,
  54. v.color,
  55. v.lm_comment,
  56. vc.name,
  57. v.chassis_nr,
  58. vo.company_name,
  59. vc.graphical_symbol,
  60. v.in_service_date,
  61. v.out_service_date,
  62. v.detailed_description,
  63. vd.total_distance,
  64. vd.rg_location,
  65. vd.rg_post_code,
  66. vd.rg_street,
  67. vd.rg_street_nr,
  68. rg_country,
  69. vs.name,
  70. esp.name,
  71. esp.equipment_store_place_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement