DBA Data[Home] [Help]

VIEW: APPS.MST_MAP_UNASSIGNED_DEL_LOV_V

Source

View Text - Preformatted

SELECT md.plan_id, md.delivery_id, md.delivery_number, wl1.city || ', ' ||wl1.state origin, wl2.city || ', ' || wl2.state destination FROM mst_deliveries md , wsh_locations wl1 , wsh_locations wl2 WHERE md.pickup_location_id = wl1.wsh_location_id and md.dropoff_location_id = wl2.wsh_location_id and not exists (select null from mst_delivery_legs mdl where mdl.plan_id = md.plan_id and mdl.delivery_id = md.delivery_id)
View Text - HTML Formatted

SELECT MD.PLAN_ID
, MD.DELIVERY_ID
, MD.DELIVERY_NUMBER
, WL1.CITY || '
, ' ||WL1.STATE ORIGIN
, WL2.CITY || '
, ' || WL2.STATE DESTINATION
FROM MST_DELIVERIES MD
, WSH_LOCATIONS WL1
, WSH_LOCATIONS WL2
WHERE MD.PICKUP_LOCATION_ID = WL1.WSH_LOCATION_ID
AND MD.DROPOFF_LOCATION_ID = WL2.WSH_LOCATION_ID
AND NOT EXISTS (SELECT NULL
FROM MST_DELIVERY_LEGS MDL
WHERE MDL.PLAN_ID = MD.PLAN_ID
AND MDL.DELIVERY_ID = MD.DELIVERY_ID)