The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT wl.meaning status,
to_char(NULL) name,
WSH_UTIL_CORE.get_location_description(dl.initial_pickup_location_id,'CSZ') pickup_loc,
to_date(NULL) pu_arrival_date,
to_date(NULL) pu_departure_date,
to_char(NULL) dropoff_loc,
to_date(NULL) do_arrival_date,
to_date(NULL) do_departure_date,
dl.ship_method_code,
hp.party_name carrier_name, -- Bug 5697730
to_char(NULL) bill_of_lading
FROM wsh_lookups wl,
wsh_new_deliveries dl,
hz_parties hp, hz_party_usg_assignments hpu
WHERE dl.name = v_delivery_name
AND hp.party_id(+) = dl.carrier_id -- Bug 5697730
AND hp.party_id = hpu.party_id(+) -- Bug 5697730
AND hpu.party_usage_code(+) = 'TRANSPORTATION_PROVIDER' -- Bug 5697730
AND wl.lookup_type = 'DELIVERY_STATUS'
AND wl.lookup_code = dl.status_code
AND nvl(dl.SHIPMENT_DIRECTION , 'O') IN ('O', 'IO') -- J inbound logistics jckwok
AND dl.status_code not in ('CL','IT'); -- sperera 940/945 -- sperera 940/945
SELECT sequence_number bill_of_lading
FROM wsh_document_instances
WHERE entity_id = v_delivery_leg_id
AND entity_name = 'WSH_DELIVERY_LEGS'
AND document_type= 'BOL';
SELECT wl.meaning status,
t.name,
WSH_UTIL_CORE.get_location_description(ts1.stop_location_id,'CSZ') pickup_loc,
ts1.actual_arrival_date pu_arrival_date,
ts1.actual_departure_date pu_departure_date,
WSH_UTIL_CORE.get_location_description(ts2.stop_location_id,'CSZC') dropoff_loc,
ts2.actual_arrival_date do_arrival_date,
ts2.actual_departure_date do_departure_date,
t.ship_method_code,
hp.party_name carrier_name, -- Bug 5697730
dg.delivery_leg_id
FROM wsh_lookups wl,
wsh_trips t,
wsh_trip_stops ts1,
wsh_trip_stops ts2,
-- wsh_document_instances di, -- Bug 3146273
wsh_delivery_legs dg,
wsh_new_deliveries dl,
hz_parties hp, hz_party_usg_assignments hpu -- Bug 5697730
WHERE dl.name = v_delivery_name
AND hp.party_id(+) = t.carrier_id -- Bug 5697730
AND hp.party_id = hpu.party_id(+) -- Bug 5697730
AND hpu.party_usage_code(+) = 'TRANSPORTATION_PROVIDER' -- Bug 5697730
AND dg.delivery_id = dl.delivery_id
AND dg.pick_up_stop_id = ts1.stop_id
-- AND ts1.status_code = 'CL'
AND dg.drop_off_stop_id = ts2.stop_id
AND ts1.trip_id = t.trip_id
--AND dg.delivery_leg_id = di.entity_id(+) -- Bug 3146273
AND wl.lookup_type = 'DELIVERY_STATUS'
AND wl.lookup_code = dl.status_code
AND nvl(dl.SHIPMENT_DIRECTION , 'O') IN ('O', 'IO') -- J inbound logistics jckwok
ORDER BY ts1.planned_arrival_date asc;
x_tracking_details.DELETE;
x_tracking_details.delete;