DBA Data[Home] [Help]

VIEW: APPS.MST_FAC_DOC_CAP_EXCEED_LOAD_V

Source

View Text - Preformatted

SELECT mt.plan_id , mt.trip_id , mt.mode_of_transport , mts.stop_location_id , mt.trip_number , mts.stop_sequence_number , mts.planned_arrival_date , mts.planned_departure_date , substr(mst_wb_util.get_local_chardtzone(mts.stop_location_id, mts.planned_arrival_date),1,40) , substr(mst_wb_util.get_local_chardtzone(mts.stop_location_id, mts.planned_departure_date),1,40) , wl1.address1 , wl1.city , wl1.state , wl1.postal_code , wl1.country , wl2.address1 , wl2.city , wl2.state , wl2.postal_code , wl2.country , substr(mst_wb_util.get_hr_min((mts.pln_loading_end_time - mts.pln_loading_start_time) * 24),1,20) , (mts.pln_loading_end_time - mts.pln_loading_start_time) * 24 , substr(mst_wb_util.get_hr_min((mts.pln_unloading_end_time - mts.pln_unloading_start_time) * 24),1,20) , (mts.pln_unloading_end_time - mts.pln_unloading_start_time) * 24 from mst_trips mt , mst_trip_stops mts , wsh_locations wl1 , wsh_locations wl2 WHERE mt.plan_id = mts.plan_id and mt.trip_id = mts.trip_id and mt.origin_location_id = wl1.wsh_location_id and mt.destination_location_id = wl2.wsh_location_id and mt.mode_of_transport = 'TRUCK'
View Text - HTML Formatted

SELECT MT.PLAN_ID
, MT.TRIP_ID
, MT.MODE_OF_TRANSPORT
, MTS.STOP_LOCATION_ID
, MT.TRIP_NUMBER
, MTS.STOP_SEQUENCE_NUMBER
, MTS.PLANNED_ARRIVAL_DATE
, MTS.PLANNED_DEPARTURE_DATE
, SUBSTR(MST_WB_UTIL.GET_LOCAL_CHARDTZONE(MTS.STOP_LOCATION_ID
, MTS.PLANNED_ARRIVAL_DATE)
, 1
, 40)
, SUBSTR(MST_WB_UTIL.GET_LOCAL_CHARDTZONE(MTS.STOP_LOCATION_ID
, MTS.PLANNED_DEPARTURE_DATE)
, 1
, 40)
, WL1.ADDRESS1
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, WL2.ADDRESS1
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, SUBSTR(MST_WB_UTIL.GET_HR_MIN((MTS.PLN_LOADING_END_TIME - MTS.PLN_LOADING_START_TIME) * 24)
, 1
, 20)
, (MTS.PLN_LOADING_END_TIME - MTS.PLN_LOADING_START_TIME) * 24
, SUBSTR(MST_WB_UTIL.GET_HR_MIN((MTS.PLN_UNLOADING_END_TIME - MTS.PLN_UNLOADING_START_TIME) * 24)
, 1
, 20)
, (MTS.PLN_UNLOADING_END_TIME - MTS.PLN_UNLOADING_START_TIME) * 24
FROM MST_TRIPS MT
, MST_TRIP_STOPS MTS
, WSH_LOCATIONS WL1
, WSH_LOCATIONS WL2
WHERE MT.PLAN_ID = MTS.PLAN_ID
AND MT.TRIP_ID = MTS.TRIP_ID
AND MT.ORIGIN_LOCATION_ID = WL1.WSH_LOCATION_ID
AND MT.DESTINATION_LOCATION_ID = WL2.WSH_LOCATION_ID
AND MT.MODE_OF_TRANSPORT = 'TRUCK'