DBA Data[Home] [Help]

VIEW: APPS.MST_ACT_ANALYZE_DISSOLVE_CM_V

Source

View Text - Preformatted

SELECT mor.plan_id, mor.trip_id, mir.in_request_id, substr(MST_WB_UTIL.get_load_type(mt.plan_id, mt.trip_id), 1, 80), mt.trip_number, flp.facility_code, wl1.city, wl1.state, wl1.postal_code, wl1.country, wl2.city, wl2.state, wl2.postal_code, wl2.country, MST_GEOCODING.Get_local_time(mt.destination_location_id, mt.trip_end_date), to_char(MST_GEOCODING.Get_local_time(mt.destination_location_id, mt.trip_end_date), 'HH:MI'), MST_GEOCODING.Get_timezone_code(mt.destination_location_id, mt.trip_end_date), MST_GEOCODING.Get_local_time(mt.origin_location_id, mt.trip_start_date), to_char(MST_GEOCODING.Get_local_time(mt.origin_location_id, mt.trip_start_date), 'HH:MI'), MST_GEOCODING.Get_timezone_code(mt.origin_location_id, mt.trip_start_date), mt.total_trip_distance, mp.distance_uom, wc1.freight_code, (mt.total_basic_transport_cost + mt.total_accessorial_cost + mt.total_handling_cost + mt.total_layover_cost + mt.total_load_unload_cost + mt.total_stop_cost), wc2.freight_code, mor.number2, mp.currency_uom from mst_plans mp, mst_trips mt, mst_out_requests mor, mst_in_requests mir, wsh_locations wl1, wsh_locations wl2, wsh_carriers wc1, wsh_carriers wc2, fte_location_parameters flp WHERE mp.plan_id = mor.plan_id and mor.in_request_id = mir.in_request_id and mor.trip_id = mt.trip_id and mt.plan_id = mor.plan_id and mt.origin_location_id = wl1.wsh_location_id and mt.destination_location_id = wl2.wsh_location_id and mt.carrier_id = wc1.carrier_id and mor.carrier_id = wc2.carrier_id (+) and flp.location_id = wl1.wsh_location_id
View Text - HTML Formatted

SELECT MOR.PLAN_ID
, MOR.TRIP_ID
, MIR.IN_REQUEST_ID
, SUBSTR(MST_WB_UTIL.GET_LOAD_TYPE(MT.PLAN_ID
, MT.TRIP_ID)
, 1
, 80)
, MT.TRIP_NUMBER
, FLP.FACILITY_CODE
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, MST_GEOCODING.GET_LOCAL_TIME(MT.DESTINATION_LOCATION_ID
, MT.TRIP_END_DATE)
, TO_CHAR(MST_GEOCODING.GET_LOCAL_TIME(MT.DESTINATION_LOCATION_ID
, MT.TRIP_END_DATE)
, 'HH:MI')
, MST_GEOCODING.GET_TIMEZONE_CODE(MT.DESTINATION_LOCATION_ID
, MT.TRIP_END_DATE)
, MST_GEOCODING.GET_LOCAL_TIME(MT.ORIGIN_LOCATION_ID
, MT.TRIP_START_DATE)
, TO_CHAR(MST_GEOCODING.GET_LOCAL_TIME(MT.ORIGIN_LOCATION_ID
, MT.TRIP_START_DATE)
, 'HH:MI')
, MST_GEOCODING.GET_TIMEZONE_CODE(MT.ORIGIN_LOCATION_ID
, MT.TRIP_START_DATE)
, MT.TOTAL_TRIP_DISTANCE
, MP.DISTANCE_UOM
, WC1.FREIGHT_CODE
, (MT.TOTAL_BASIC_TRANSPORT_COST + MT.TOTAL_ACCESSORIAL_COST + MT.TOTAL_HANDLING_COST + MT.TOTAL_LAYOVER_COST + MT.TOTAL_LOAD_UNLOAD_COST + MT.TOTAL_STOP_COST)
, WC2.FREIGHT_CODE
, MOR.NUMBER2
, MP.CURRENCY_UOM
FROM MST_PLANS MP
, MST_TRIPS MT
, MST_OUT_REQUESTS MOR
, MST_IN_REQUESTS MIR
, WSH_LOCATIONS WL1
, WSH_LOCATIONS WL2
, WSH_CARRIERS WC1
, WSH_CARRIERS WC2
, FTE_LOCATION_PARAMETERS FLP
WHERE MP.PLAN_ID = MOR.PLAN_ID
AND MOR.IN_REQUEST_ID = MIR.IN_REQUEST_ID
AND MOR.TRIP_ID = MT.TRIP_ID
AND MT.PLAN_ID = MOR.PLAN_ID
AND MT.ORIGIN_LOCATION_ID = WL1.WSH_LOCATION_ID
AND MT.DESTINATION_LOCATION_ID = WL2.WSH_LOCATION_ID
AND MT.CARRIER_ID = WC1.CARRIER_ID
AND MOR.CARRIER_ID = WC2.CARRIER_ID (+)
AND FLP.LOCATION_ID = WL1.WSH_LOCATION_ID