DBA Data[Home] [Help]

VIEW: APPS.MST_EMPTY_TRIPS_V

Source

View Text - Preformatted

SELECT med.plan_id , med.exception_type , mt.trip_id , mt.carrier_id , mt.planned_flag , med.exception_detail_id , mt.trip_number , wc.freight_code , mt.service_level , wlk1.meaning , mt.mode_of_transport , wlk.meaning , wl1.address1 , wl1.city , wl1.state , wl1.postal_code , wl1.country , wl2.address1 , wl2.city , wl2.state , wl2.postal_code , wl2.country , 0, 0, 0, 0, 0, 0, 0, nvl(mt.total_basic_transport_cost,0) , mp.currency_uom , ml.meaning , substr(mst_wb_util.get_workflow_status(med.plan_id, med.exception_detail_id),1,20) from mst_plans mp , mst_exception_details med , mst_trips mt , wsh_carriers wc , mfg_lookups ml , wsh_lookups wlk , wsh_lookups wlk1 , wsh_locations wl1 , wsh_locations wl2 WHERE med.status = ml.lookup_code and ml.lookup_type = 'MST_EXCEPTION_STATUS' and med.plan_id = mp.plan_id and med.plan_id = mt.plan_id and med.trip_id1 = mt.trip_id and mt.carrier_id = wc.carrier_id and mt.origin_location_id = wl1.wsh_location_id and mt.destination_location_id = wl2.wsh_location_id and mt.mode_of_transport = wlk.lookup_code and wlk.lookup_type = 'WSH_MODE_OF_TRANSPORT' and mt.service_level = wlk1.lookup_code and wlk1.lookup_type = 'WSH_SERVICE_LEVELS' group by med.plan_id , med.exception_type , mt.trip_id , mt.carrier_id , mt.planned_flag , med.exception_detail_id , mt.trip_number , wc.freight_code , mt.service_level , wlk1.meaning , mt.mode_of_transport , wlk.meaning , wl1.address1 , wl1.city , wl1.state , wl1.postal_code , wl1.country , wl2.address1 , wl2.city , wl2.state , wl2.postal_code , wl2.country , mp.weight_uom , mp.volume_uom , nvl(mt.total_basic_transport_cost,0) , mp.currency_uom , ml.meaning
View Text - HTML Formatted

SELECT MED.PLAN_ID
, MED.EXCEPTION_TYPE
, MT.TRIP_ID
, MT.CARRIER_ID
, MT.PLANNED_FLAG
, MED.EXCEPTION_DETAIL_ID
, MT.TRIP_NUMBER
, WC.FREIGHT_CODE
, MT.SERVICE_LEVEL
, WLK1.MEANING
, MT.MODE_OF_TRANSPORT
, WLK.MEANING
, WL1.ADDRESS1
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, WL2.ADDRESS1
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, 0
, 0
, 0
, 0
, 0
, 0
, 0
, NVL(MT.TOTAL_BASIC_TRANSPORT_COST
, 0)
, MP.CURRENCY_UOM
, ML.MEANING
, SUBSTR(MST_WB_UTIL.GET_WORKFLOW_STATUS(MED.PLAN_ID
, MED.EXCEPTION_DETAIL_ID)
, 1
, 20)
FROM MST_PLANS MP
, MST_EXCEPTION_DETAILS MED
, MST_TRIPS MT
, WSH_CARRIERS WC
, MFG_LOOKUPS ML
, WSH_LOOKUPS WLK
, WSH_LOOKUPS WLK1
, WSH_LOCATIONS WL1
, WSH_LOCATIONS WL2
WHERE MED.STATUS = ML.LOOKUP_CODE
AND ML.LOOKUP_TYPE = 'MST_EXCEPTION_STATUS'
AND MED.PLAN_ID = MP.PLAN_ID
AND MED.PLAN_ID = MT.PLAN_ID
AND MED.TRIP_ID1 = MT.TRIP_ID
AND MT.CARRIER_ID = WC.CARRIER_ID
AND MT.ORIGIN_LOCATION_ID = WL1.WSH_LOCATION_ID
AND MT.DESTINATION_LOCATION_ID = WL2.WSH_LOCATION_ID
AND MT.MODE_OF_TRANSPORT = WLK.LOOKUP_CODE
AND WLK.LOOKUP_TYPE = 'WSH_MODE_OF_TRANSPORT'
AND MT.SERVICE_LEVEL = WLK1.LOOKUP_CODE
AND WLK1.LOOKUP_TYPE = 'WSH_SERVICE_LEVELS' GROUP BY MED.PLAN_ID
, MED.EXCEPTION_TYPE
, MT.TRIP_ID
, MT.CARRIER_ID
, MT.PLANNED_FLAG
, MED.EXCEPTION_DETAIL_ID
, MT.TRIP_NUMBER
, WC.FREIGHT_CODE
, MT.SERVICE_LEVEL
, WLK1.MEANING
, MT.MODE_OF_TRANSPORT
, WLK.MEANING
, WL1.ADDRESS1
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, WL2.ADDRESS1
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, MP.WEIGHT_UOM
, MP.VOLUME_UOM
, NVL(MT.TOTAL_BASIC_TRANSPORT_COST
, 0)
, MP.CURRENCY_UOM
, ML.MEANING