Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT v.vehicle_id,
- v.company_nr,
- v.numberplate,
- v.brand,
- v.model,
- v.color,
- v.lm_comment,
- vc.name,
- v.chassis_nr,
- vo.company_name,
- vc.graphical_symbol,
- v.in_service_date,
- v.out_service_date,
- v.detailed_description,
- vd.total_distance,
- vd.rg_location,
- vd.rg_post_code,
- vd.rg_street,
- vd.rg_street_nr,
- rg_country,
- vs.name,
- esp.name,
- esp.equipment_store_place_id,
- LISTAGG(kc.key_string, ',') WITHIN GROUP (ORDER BY key_string) AS key_code_strings
- -- ,
- -- kc.key_string,
- -- kc.key_code_usage_id
- FROM equipment_store_place esp,
- vehicle_owner vo,
- VO_VEHICLE_CATEGORY vc,
- VEHICLE v,
- vehicle_status vs,
- vehicle_data vd,
- gu_vehicle gv,
- gui_users gu,
- key_code kc
- WHERE gu.gui_user_id = gv.gui_user_id
- and gv.vehicle_id = v.vehicle_id
- and v.vo_vehicle_category_id = vc.vo_vehicle_category_id
- and v.vehicle_status_id=vs.vehicle_status_id(+)
- and vc.vehicle_owner_id = vo.vehicle_owner_id
- --and nvl(vc.is_active,'Y') = 'Y'
- and v.last_vehicle_data_id = vd.vehicle_data_id(+)
- --and nvl(v.vehicle_status_id,0) = 0
- and v.last_equipment_store_place_id = esp.equipment_store_place_id
- and v.vehicle_id = kc.key_code_id
- AND v.vehicle_id = 118312--121352 118312
- AND gv.gui_user_id = 102737
- group by v.vehicle_id,
- v.company_nr,
- v.numberplate,
- v.brand,
- v.model,
- v.color,
- v.lm_comment,
- vc.name,
- v.chassis_nr,
- vo.company_name,
- vc.graphical_symbol,
- v.in_service_date,
- v.out_service_date,
- v.detailed_description,
- vd.total_distance,
- vd.rg_location,
- vd.rg_post_code,
- vd.rg_street,
- vd.rg_street_nr,
- rg_country,
- vs.name,
- esp.name,
- esp.equipment_store_place_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement