View slot9.WORLD.TSTA.VEHICLE_SEARCH_TEST_VW |
View Definition:
SELECT USER || v.vehicle_id ID, USER county, v.vehicle_id vid,
INITCAP (v.vin) vin,
INITCAP ((SELECT vm.vehicle_make_desc
FROM vehicle_makes vm
WHERE UPPER (vm.vehicle_make_code) =
UPPER (v.vma_vehicle_make_code)
AND UPPER (vm.vtc_type_code) = UPPER (v.vtc_type_code))
) vmake,
v.vma_vehicle_make_code AS vmakecode,
INITCAP ((SELECT vmd.vehicle_model_desc
FROM vehicle_models vmd
WHERE UPPER (vmd.vehicle_model_code) =
UPPER (v.vmo_vehicle_model_code)
AND UPPER (vmd.vma_vehicle_make_code) =
UPPER (v.vma_vehicle_make_code)
AND UPPER (vmd.vtc_type_code) = UPPER (v.vtc_type_code))
) vmodel,
v.vmo_vehicle_model_code AS vmodelcode,
INITCAP ((SELECT vs.vehicle_style_desc
FROM vehicle_styles vs
WHERE UPPER (vs.vehicle_style_code) =
UPPER (v.vst_vehicle_style_code)
AND UPPER (vs.vtc_type_code) = UPPER (v.vtc_type_code))
) vstyle,
v.vst_vehicle_style_code AS vstylecode, v.YEAR vyear,
INITCAP ((SELECT vt.type_desc
FROM vehicle_type_codes vt
WHERE UPPER (vt.type_code) = UPPER (v.vtc_type_code))
) vtype,
v.vtc_type_code AS vtypecode, v.indx_sec_level_id vsecurity,
v.indx_sec_level_code vseccode, v.indx_type_code vindxtype,
v.mccs mccs, vd.lic_state_code licstate,
INITCAP ((SELECT ec.description
FROM ejs_codes ec
WHERE UPPER (ec.code_type) = UPPER (vd.top_color_type)
AND UPPER (ec.code) = UPPER (vd.top_color))
) AS vtopcolor,
INITCAP ((SELECT ec.description
FROM ejs_codes ec
WHERE UPPER (ec.code_type) = UPPER (vd.bottom_color_type)
AND UPPER (ec.code) = UPPER (vd.bottom_color))
) AS vbottomcolor,
INITCAP ((SELECT ec.description
FROM ejs_codes ec
WHERE UPPER (ec.code_type) =
UPPER (vd.lic_state_code_type)
AND UPPER (ec.code) = UPPER (vd.lic_state_code))
) AS vlicstate,
vd.bottom_color bcolor, vd.top_color tcolor,
INITCAP (vd.lic_number) licnum, vd.damage_code AS damage,
vd.cond_code AS condition
FROM vehicles v LEFT OUTER JOIN vehicle_descriptions vd
ON v.vehicle_id = vd.vehicle_id
Possibly Referenced Tables/Views: