View slot9.WORLD.TSTA.DV_CRASH_TOWS_VW
Legend:
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
CRASH_ID number 0
DV_CRASHES.CRASH_ID Implied Constraint R
CRASH_REPORT_NUMBER varchar2 100
VEHICLE_ID number 0
DEPARTMENT_VEHICLES.VEHICLE_ID Implied Constraint R
AGENCY_CODE varchar2 30  √  null
AGENCY_CODES.AGENCY_CODE Implied Constraint R
AGENCY_DESC varchar2 40  √  null
OFFICER_ID number 0  √  null
OFFICERS.OFFICER_ID Implied Constraint R
OFFICER_DESC varchar2 4000  √  null
EMPLOYEE_ID number 0  √  null
EMPLOYEE_DESC varchar2 4000  √  null
CRASH_DATE date 7  √  null
HOUR_GROUP_CODE varchar2 30  √  null
HOUR_GROUP_DESC varchar2 4000  √  null
COUNTY_CODE varchar2 30  √  null
COUNTY_CODE_DESC varchar2 4000  √  null
STATUS_CODE varchar2 30  √  null
STATUS_CODE_DESC varchar2 4000  √  null
CRASH_TYPE_CODE varchar2 30  √  null
CRASH_TYPE_DESC varchar2 4000  √  null
CRASH_CAUSE_CODE varchar2 30  √  null
CRASH_CAUSE_DESC varchar2 4000  √  null
ADDRESS_ID number 0  √  null
ADDRESSES.ADDRESS_ID Implied Constraint R
ADDRESS_DESC varchar2 4000  √  null
LOCATION_COMMENTS varchar2 200  √  null
SUMMARY varchar2 500  √  null
IS_PREVENTABLE varchar2 1  √  null
IS_PURSUIT varchar2 1  √  null
IS_TRAFFIC_STOP varchar2 1  √  null
UNIT_NUMBER varchar2 255  √  null
COMPANY_NAME varchar2 40  √  null
STATE_CODE varchar2 30  √  null
TOWING_CO_STREET varchar2 40  √  null
TOWING_CO_ZIP number 0  √  null
TOWING_CO_CITY varchar2 40  √  null
PHONE_PREFIX varchar2 3  √  null
PHONE_SUFFIX varchar2 4  √  null
PHONE_AREA varchar2 3  √  null
DRIVER varchar2 80  √  null
TOW_DATE date 7  √  null
TOW_REFERENCE_NUMBER varchar2 100  √  null
TOW_COST number 0  √  null
CREATOR_ID varchar2 100  √  null
CREATOR_DATE date 7  √  null
UPDATOR_ID varchar2 100  √  null
UPDATOR_DATE date 7  √  null

Analyzed at Mon Sep 20 21:05 MDT 2021

View Definition:
select c.crash_id, c.crash_report_number, c.vehicle_id, c.agency_code, (select ac.agency_desc from agency_codes ac where ac.agency_code=c.agency_code) as agency_desc, c.officer_id, get_off_emp_name(c.officer_id,'O') as officer_desc, c.employee_id, get_off_emp_name(c.employee_id,'E') as employee_desc, c.crash_date, c.hour_group_code, (select ec.description from ejs_codes ec where ec.code_type=c.hour_group_code_type and ec.code=c.hour_group_code) as hour_group_desc, c.county_code, (select ec.description from ejs_codes ec where ec.code_type=c.county_code_type and ec.code=c.county_code) as county_code_desc, c.status_code, (select ec.description from ejs_codes ec where ec.code_type=c.status_code_type and ec.code=c.status_code) as status_code_desc, c.crash_type_code, (select ec.description from ejs_codes ec where ec.code_type=c.crash_type_code_type and ec.code=c.crash_type_code) as crash_type_desc, c.crash_cause_code, (select ec.description from ejs_codes ec where ec.code_type=c.crash_cause_code_type and ec.code=c.crash_cause_code) as crash_cause_desc, c.address_id, ejs_format_address(c.address_id) as address_desc, c.location_comment, c.summary, c.is_preventable, c.is_pursuit, c.is_traffic_stop, dv.unit_number, nvl(ctow.towing_co,tcc.towing_co_name), nvl(ctow.state_cd_state_code,tcc.towing_co_state), nvl(ctow.towing_co_street,tcc.towing_co_street), nvl(ctow.towing_co_zip,tcc.towing_co_zip), nvl(ctow.towing_city,tcc.towing_co_city), nvl(ctow.phone_prefix,tcc.phone_prefix), nvl(ctow.phone_suffix,tcc.phone_suffix), nvl(ctow.phone_area,tcc.phone_area), ctow.driver, ctow.tow_date, ctow.reference_number, ctow.tow_cost, ctow.creator_id, ctow.creator_date, ctow.updator_id, ctow.updator_date from dv_crashes c inner join department_vehicles dv on c.vehicle_id = dv.vehicle_id inner join dv_crash_tows ctow on c.crash_id = ctow.crash_id left outer join tow_company_codes tcc on ctow.towing_co_id = tcc.towing_co_id
 
Possibly Referenced Tables/Views:


Close relationships: