DBA Data[Home] [Help]

APPS.WSH_NEW_DELIVERY_ACTIONS dependencies on WSH_TRIP_STOPS

Line 1747: wsh_trip_stops st,

1743: dl.organization_id,
1744: t.name
1745: FROM wsh_new_deliveries dl,
1746: wsh_delivery_legs dg,
1747: wsh_trip_stops st,
1748: wsh_trips t
1749: WHERE dl.delivery_id = p_delivery_id AND
1750: dl.delivery_id = dg.delivery_id AND
1751: dg.pick_up_stop_id = st.stop_id AND

Line 2195: from wsh_delivery_legs wdl, wsh_trip_stops wts

2191: WHERE rs.report_set_id = p_report_set_id;
2192:
2193: CURSOR Check_Trip (l_delivery_id NUMBER) IS
2194: select wts.trip_id
2195: from wsh_delivery_legs wdl, wsh_trip_stops wts
2196: where wdl.pick_up_stop_id=wts.stop_id
2197: and wdl.delivery_id=l_delivery_id
2198: and rownum=1;
2199:

Line 2256: wsh_trip_stops st,

2252: CURSOR c_first_ship_method (p_delivery_id IN number)IS
2253: SELECT wt.ship_method_code
2254: FROM wsh_new_deliveries del,
2255: wsh_delivery_legs dlg,
2256: wsh_trip_stops st,
2257: wsh_trips wt
2258: WHERE del.delivery_id = dlg.delivery_id
2259: AND dlg.pick_up_stop_id = st.stop_id
2260: AND del.initial_pickup_location_id = st.stop_location_id

Line 2650: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_trips wt

2646: SELECT wt.trip_id , wt.carrier_id, wt.ship_method_code, wt.mode_of_transport,
2647: --OTM R12
2648: wt.tp_plan_name
2649: --
2650: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_trips wt
2651: WHERE wdl.pick_up_stop_id=wts.stop_id
2652: AND wdl.delivery_id=v_del_id
2653: AND wts.trip_id=wt.trip_id;
2654:

Line 2694: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_new_deliveries wnd

2690:
2691:
2692: CURSOR Get_Del_First_Trip(v_del_id NUMBER) IS
2693: SELECT wts.trip_id
2694: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_new_deliveries wnd
2695: WHERE wdl.pick_up_stop_id=wts.stop_id
2696: AND wnd.initial_pickup_location_id = wts.stop_location_id
2697: AND wnd.delivery_id = wdl.delivery_id
2698: AND wnd.delivery_id=v_del_id;

Line 2704: FROM wsh_trip_stops

2700:
2701: --bug 3314353 -- jckwok
2702: CURSOR prev_stop_csr ( p_trip_id IN NUMBER, p_stop_sequence IN NUMBER) IS
2703: SELECT stop_id
2704: FROM wsh_trip_stops
2705: WHERE trip_id = p_trip_id
2706: AND status_code IN ('OP','AR')
2707: AND stop_sequence_number < p_stop_sequence
2708: AND nvl(shipments_type_flag,'0') <> 'I' --bugfix 3925963

Line 2714: FROM wsh_trip_stops

2710:
2711: --bug 3314353 -- jckwok
2712: CURSOR get_stops_csr (p_trip_id IN NUMBER) IS
2713: SELECT stop_id,shipments_type_flag,stop_location_id --bugfix 3925963
2714: FROM wsh_trip_stops
2715: WHERE trip_id = p_trip_id
2716: AND status_code IN ('OP','AR')
2717: ORDER BY stop_sequence_number;
2718:

Line 2728: FROM wsh_trip_stops

2724:
2725: --bug 3314353 -- jckwok
2726: CURSOR stop_sequence_number_csr (p_stop_id IN NUMBER) IS
2727: SELECT stop_sequence_number
2728: FROM wsh_trip_stops
2729: WHERE stop_id = p_stop_id;
2730:
2731: -- Added for bug 4493263
2732: CURSOR c_delv_trip_id_cursor( t_delivery_id NUMBER ) IS

Line 2733: select distinct trip_id from wsh_trip_stops

2729: WHERE stop_id = p_stop_id;
2730:
2731: -- Added for bug 4493263
2732: CURSOR c_delv_trip_id_cursor( t_delivery_id NUMBER ) IS
2733: select distinct trip_id from wsh_trip_stops
2734: where stop_id in
2735: ( select distinct pick_up_stop_id
2736: from wsh_delivery_legs
2737: where delivery_id = t_delivery_id );

Line 2955: l_stop_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;

2951: l_close_del_cnt NUMBER := 0;
2952: l_confirm_del_cnt NUMBER := 0;
2953:
2954: /*new variable */
2955: l_stop_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;
2956: l_trip_rec WSH_TRIPS_PVT.trip_rec_type;
2957: -- bug 2263249
2958: l_wms_enabled_flag BOOLEAN;
2959: -- bug 2343058

Line 2990: l_cc_stop_attr_tab WSH_TRIP_STOPS_PVT.Stop_Attr_Tbl_Type;

2986: --dummy tables for calling validate_constraint_wrapper
2987: l_cc_del_attr_tab WSH_NEW_DELIVERIES_PVT.Delivery_Attr_Tbl_Type;
2988: l_cc_det_attr_tab WSH_GLBL_VAR_STRCT_GRP.Delivery_Details_Attr_Tbl_Type;
2989: l_cc_trip_attr_tab WSH_TRIPS_PVT.Trip_Attr_Tbl_Type;
2990: l_cc_stop_attr_tab WSH_TRIP_STOPS_PVT.Stop_Attr_Tbl_Type;
2991: l_cc_in_ids wsh_util_core.id_tab_type;
2992: l_cc_fail_ids wsh_util_core.id_tab_type;
2993: l_cc_carrier_id NUMBER;
2994: l_cc_mode VARCHAR2(30);

Line 7194: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);

7190:
7191: if u_stop_rows.count > 0 then
7192:
7193: IF l_debug_on THEN
7194: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7195: END IF;
7196: --
7197: wsh_trip_stops_actions.change_status(
7198: p_stop_rows => u_stop_rows,

Line 7197: wsh_trip_stops_actions.change_status(

7193: IF l_debug_on THEN
7194: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7195: END IF;
7196: --
7197: wsh_trip_stops_actions.change_status(
7198: p_stop_rows => u_stop_rows,
7199: p_action => 'CLOSE',
7200: p_actual_date => nvl(p_actual_dep_date,sysdate),
7201: p_defer_interface_flag => p_defer_interface_flag, -- bug 1578251

Line 7933: wsh_Trip_stops wts

7929: CURSOR delivery_stops_csr (p_delivery_id NUMBER)
7930: IS
7931: SELECT stop_id
7932: FROM wsh_delivery_legs wdl,
7933: wsh_Trip_stops wts
7934: WHERE wdl.delivery_id = p_delivery_id
7935: AND (
7936: wdl.pick_up_stop_id = wts.stop_id
7937: OR wdl.drop_off_stop_id = wts.stop_id

Line 8127: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);

8123: --
8124: -- Debug Statements
8125: --
8126: IF l_debug_on THEN
8127: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
8128: END IF;
8129: --
8130: wsh_trip_stops_actions.change_status
8131: (

Line 8130: wsh_trip_stops_actions.change_status

8126: IF l_debug_on THEN
8127: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
8128: END IF;
8129: --
8130: wsh_trip_stops_actions.change_status
8131: (
8132: p_stop_rows => l_stop_rows,
8133: p_action => 'CLOSE',
8134: p_actual_date => p_in_rec.actual_date,

Line 8241: wsh_trip_stops pu_stop,

8237: pu_stop.status_code pu_status,
8238: dg.drop_off_stop_id,
8239: do_stop.status_code do_status
8240: FROM wsh_delivery_legs dg,
8241: wsh_trip_stops pu_stop,
8242: wsh_trip_stops do_stop
8243: WHERE dg.delivery_id = l_delivery_id
8244: AND pu_stop.stop_id = dg.pick_up_stop_id
8245: AND do_stop.stop_id = dg.drop_off_stop_id;

Line 8242: wsh_trip_stops do_stop

8238: dg.drop_off_stop_id,
8239: do_stop.status_code do_status
8240: FROM wsh_delivery_legs dg,
8241: wsh_trip_stops pu_stop,
8242: wsh_trip_stops do_stop
8243: WHERE dg.delivery_id = l_delivery_id
8244: AND pu_stop.stop_id = dg.pick_up_stop_id
8245: AND do_stop.stop_id = dg.drop_off_stop_id;
8246:

Line 8793: wsh_trip_stops st1,

8789: SELECT dg.delivery_leg_id leg_id,
8790: st1.stop_location_id pickup,
8791: st2.stop_location_id dropoff
8792: FROM wsh_delivery_legs dg,
8793: wsh_trip_stops st1,
8794: wsh_trip_stops st2
8795: WHERE dg.delivery_id = p_delivery_id AND
8796: st1.stop_id = dg.pick_up_stop_id AND
8797: st2.stop_id = dg.drop_off_stop_id AND

Line 8794: wsh_trip_stops st2

8790: st1.stop_location_id pickup,
8791: st2.stop_location_id dropoff
8792: FROM wsh_delivery_legs dg,
8793: wsh_trip_stops st1,
8794: wsh_trip_stops st2
8795: WHERE dg.delivery_id = p_delivery_id AND
8796: st1.stop_id = dg.pick_up_stop_id AND
8797: st2.stop_id = dg.drop_off_stop_id AND
8798: st1.stop_location_id = l_pickup_location_id;

Line 8803: wsh_trip_stops st1,

8799:
8800: CURSOR dropoff_delivery_legs(l_pickup_location_id IN NUMBER) IS
8801: SELECT count(*)
8802: FROM wsh_delivery_legs dg,
8803: wsh_trip_stops st1,
8804: wsh_trip_stops st2
8805: WHERE dg.delivery_id = p_delivery_id AND
8806: st1.stop_id = dg.pick_up_stop_id AND
8807: st2.stop_id = dg.drop_off_stop_id AND

Line 8804: wsh_trip_stops st2

8800: CURSOR dropoff_delivery_legs(l_pickup_location_id IN NUMBER) IS
8801: SELECT count(*)
8802: FROM wsh_delivery_legs dg,
8803: wsh_trip_stops st1,
8804: wsh_trip_stops st2
8805: WHERE dg.delivery_id = p_delivery_id AND
8806: st1.stop_id = dg.pick_up_stop_id AND
8807: st2.stop_id = dg.drop_off_stop_id AND
8808: st2.stop_location_id = l_pickup_location_id;

Line 10002: wsh_trip_stops wts

9998: CURSOR stop_csr(p_delivery_id IN NUMBER, p_location_id IN NUMBER)
9999: IS
10000: SELECT stop_id
10001: FROM wsh_delivery_legs wdl,
10002: wsh_trip_stops wts
10003: WHERE wdl.delivery_id = p_delivery_id
10004: AND wdl.pick_up_stop_id = wts.stop_id
10005: AND wts.stop_location_id = p_location_id;
10006: --

Line 10029: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;

10025: l_return_status VARCHAR2(10);
10026: l_location_name VARCHAR2(60);
10027:
10028: -- J+ Internal Location
10029: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;
10030: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
10031: l_trip_id_tab wsh_util_core.id_tab_type;
10032: l_success_trip_ids wsh_util_core.id_tab_type;
10033: -- End of J+ Internal Location

Line 10030: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;

10026: l_location_name VARCHAR2(60);
10027:
10028: -- J+ Internal Location
10029: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;
10030: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
10031: l_trip_id_tab wsh_util_core.id_tab_type;
10032: l_success_trip_ids wsh_util_core.id_tab_type;
10033: -- End of J+ Internal Location
10034: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;

Line 10034: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;

10030: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
10031: l_trip_id_tab wsh_util_core.id_tab_type;
10032: l_success_trip_ids wsh_util_core.id_tab_type;
10033: -- End of J+ Internal Location
10034: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;
10035: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;
10036: l_trip_rec WSH_TRIPS_PVT.TRIP_REC_TYPE;
10037: --
10038: l_debug_on BOOLEAN;

Line 10035: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;

10031: l_trip_id_tab wsh_util_core.id_tab_type;
10032: l_success_trip_ids wsh_util_core.id_tab_type;
10033: -- End of J+ Internal Location
10034: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;
10035: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;
10036: l_trip_rec WSH_TRIPS_PVT.TRIP_REC_TYPE;
10037: --
10038: l_debug_on BOOLEAN;
10039: --

Line 10135: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_GRP.GET_STOP_DETAILS_PVT',WSH_DEBUG_SV.C_PROC_LEVEL);

10131: --
10132: -- Debug Statements
10133: --
10134: IF l_debug_on THEN
10135: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_GRP.GET_STOP_DETAILS_PVT',WSH_DEBUG_SV.C_PROC_LEVEL);
10136: END IF;
10137: --
10138: wsh_trip_stops_grp.get_stop_details_pvt
10139: (p_stop_id => stop_rec.stop_id,

Line 10138: wsh_trip_stops_grp.get_stop_details_pvt

10134: IF l_debug_on THEN
10135: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_GRP.GET_STOP_DETAILS_PVT',WSH_DEBUG_SV.C_PROC_LEVEL);
10136: END IF;
10137: --
10138: wsh_trip_stops_grp.get_stop_details_pvt
10139: (p_stop_id => stop_rec.stop_id,
10140: x_stop_rec => l_stop_rec,
10141: x_return_status => l_return_status);
10142: --

Line 10205: UPDATE wsh_trip_stops

10201: --
10202: --
10203: -- J+ Internal Locations, along with new location, update
10204: -- physical_stop_id and physical_location_id
10205: UPDATE wsh_trip_stops
10206: SET stop_location_id = p_location_id,
10207: last_update_date = SYSDATE,
10208: last_updated_by = FND_GLOBAL.USER_ID,
10209: last_update_login = FND_GLOBAL.LOGIN_ID,

Line 10370: -- wsh_delivery_legs and wsh_trip_stops

10366: -- First row found is enough
10367:
10368: -- bug 4891897, sql 15038247
10369: -- 1) wsh_delivery_trips_v is replaced with the join of
10370: -- wsh_delivery_legs and wsh_trip_stops
10371: -- 2) query is flattened instead of using the subquery for lower sharable memory
10372:
10373: CURSOR Check_Last_Trip (l_delivery_id NUMBER) IS
10374: SELECT s1.trip_id

Line 10375: FROM wsh_trip_stops s1,

10371: -- 2) query is flattened instead of using the subquery for lower sharable memory
10372:
10373: CURSOR Check_Last_Trip (l_delivery_id NUMBER) IS
10374: SELECT s1.trip_id
10375: FROM wsh_trip_stops s1,
10376: wsh_delivery_legs dl1,
10377: wsh_new_deliveries d1,
10378: wsh_trip_stops s2,
10379: wsh_delivery_legs dl2

Line 10378: wsh_trip_stops s2,

10374: SELECT s1.trip_id
10375: FROM wsh_trip_stops s1,
10376: wsh_delivery_legs dl1,
10377: wsh_new_deliveries d1,
10378: wsh_trip_stops s2,
10379: wsh_delivery_legs dl2
10380: WHERE d1.delivery_id <> l_delivery_id
10381: AND s1.stop_id = dl1.pick_up_stop_id
10382: AND d1.delivery_id = dl1.delivery_id

Line 10481: FROM wsh_delivery_legs d, wsh_trip_stops s

10477: WHERE delivery_id = x_delivery_id;
10478:
10479: CURSOR check_shared_trip(x_delivery_leg_id NUMBER) IS
10480: SELECT count(s.trip_id ), min(s.trip_id)
10481: FROM wsh_delivery_legs d, wsh_trip_stops s
10482: WHERE d.pick_up_stop_id = s.stop_id
10483: AND s.trip_id = (SELECT s1.trip_id
10484: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10485: WHERE d1.delivery_leg_id = x_delivery_leg_id

Line 10484: FROM wsh_trip_stops s1, wsh_delivery_legs d1

10480: SELECT count(s.trip_id ), min(s.trip_id)
10481: FROM wsh_delivery_legs d, wsh_trip_stops s
10482: WHERE d.pick_up_stop_id = s.stop_id
10483: AND s.trip_id = (SELECT s1.trip_id
10484: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10485: WHERE d1.delivery_leg_id = x_delivery_leg_id
10486: AND s1.stop_id = d1.pick_up_stop_id);
10487:
10488: -- Hiding project

Line 10493: FROM wsh_new_deliveries n, wsh_delivery_legs d, wsh_trip_stops s

10489: -- count('CONSOLIDATION') should be 1
10490:
10491: CURSOR check_shared_trip_consol(x_delivery_leg_id NUMBER) IS
10492: SELECT count(*), min(s.trip_id)
10493: FROM wsh_new_deliveries n, wsh_delivery_legs d, wsh_trip_stops s
10494: WHERE n.delivery_id = d.delivery_id
10495: AND d.pick_up_stop_id = s.stop_id
10496: AND s.trip_id = (SELECT s1.trip_id
10497: FROM wsh_trip_stops s1, wsh_delivery_legs d1

Line 10497: FROM wsh_trip_stops s1, wsh_delivery_legs d1

10493: FROM wsh_new_deliveries n, wsh_delivery_legs d, wsh_trip_stops s
10494: WHERE n.delivery_id = d.delivery_id
10495: AND d.pick_up_stop_id = s.stop_id
10496: AND s.trip_id = (SELECT s1.trip_id
10497: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10498: WHERE d1.delivery_leg_id = x_delivery_leg_id
10499: AND s1.stop_id = d1.pick_up_stop_id)
10500: AND d.parent_delivery_leg_id IS NULL;
10501:

Line 11814: from wsh_trip_stops wts,

11810:
11811: CURSOR check_del_assigned(p_del_id IN NUMBER) IS
11812: select wts.trip_id,
11813: wt.rank_id
11814: from wsh_trip_stops wts,
11815: wsh_delivery_legs wdl,
11816: wsh_trips wt
11817: where wdl.delivery_id = p_del_id
11818: and wts.stop_id = wdl.pick_up_stop_id

Line 12988: from wsh_trip_stops s1, wsh_trip_stops s2, wsh_delivery_legs l, wsh_new_deliveries d, wsh_trips t

12984: s1.planned_arrival_date pu_ar_date,
12985: s1.planned_departure_date pu_dep_date,
12986: s2.planned_arrival_date do_ar_date,
12987: s2.planned_departure_date do_dep_date
12988: from wsh_trip_stops s1, wsh_trip_stops s2, wsh_delivery_legs l, wsh_new_deliveries d, wsh_trips t
12989: where s1.stop_id = l.pick_up_stop_id
12990: and s2.stop_id = l.drop_off_stop_id
12991: and l.delivery_id = d.delivery_id
12992: and d.delivery_id = p_parent_del_id

Line 13019: from wsh_delivery_legs l, wsh_trip_stops s1, wsh_new_deliveries d

13015: */
13016: -- check if the trip the delivery is assigned to is valid
13017: cursor c_check_trips(p_delivery_id in number) is
13018: select l.delivery_leg_id, s1.trip_id
13019: from wsh_delivery_legs l, wsh_trip_stops s1, wsh_new_deliveries d
13020: where l.delivery_id = p_delivery_id
13021: and d.delivery_id = l.delivery_id
13022: and d.initial_pickup_location_id = s1.stop_location_id
13023: and s1.stop_id = l.pick_up_stop_id;

Line 13051: from wsh_trip_stops s1, wsh_trip_stops s2,

13047: -- along with the original trip.
13048:
13049: cursor c_get_trip_siblings(p_trip_id in number) is
13050: select distinct s2.trip_id
13051: from wsh_trip_stops s1, wsh_trip_stops s2,
13052: wsh_delivery_legs l1, wsh_delivery_legs l2
13053: where s1.trip_id = p_trip_id
13054: and s1.stop_id = l1.pick_up_stop_id
13055: and l1.delivery_id = l2.delivery_id

Line 13061: from wsh_trip_stops s, wsh_delivery_legs l

13057:
13058:
13059: cursor c_chil_del_trips(p_delivery_id in number) is
13060: select s.trip_id
13061: from wsh_trip_stops s, wsh_delivery_legs l
13062: where l.delivery_id = p_delivery_id
13063: and l.pick_up_stop_id = s.stop_id;
13064:
13065: l_parent_trip_id NUMBER;

Line 13805: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s

13801: x_return_status OUT NOCOPY VARCHAR2) IS
13802:
13803: CURSOR c_check_parent_exists(p_child_delivery_id in number, p_parent_delivery_id in number) IS
13804: select l1.delivery_id, l2.delivery_id, l1.delivery_leg_id, s.trip_id
13805: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s
13806: where l1.parent_delivery_leg_id = l2.delivery_leg_id
13807: and l1.delivery_id = p_child_delivery_id
13808: and l2.delivery_id = NVL(p_parent_delivery_id, l2.delivery_id)
13809: and d.delivery_id = l1.delivery_id

Line 13823: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s

13819: and rownum = 1;
13820:
13821: CURSOR c_get_children(p_parent_delivery_id IN NUMBER) is
13822: select l1.delivery_id, l1.delivery_leg_id, s.trip_id
13823: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s
13824: where l1.parent_delivery_leg_id = l2.delivery_leg_id
13825: and l2.delivery_id = p_parent_delivery_id
13826: and d.delivery_id = l1.delivery_id
13827: and d.status_code = 'OP'

Line 14557: wsh_trip_stops stop

14553: FROM wsh_new_deliveries child,
14554: wsh_new_deliveries parent,
14555: wsh_delivery_legs child_leg,
14556: wsh_delivery_legs parent_leg,
14557: wsh_trip_stops stop
14558: WHERE child_leg.delivery_id = p_delivery_id
14559: AND child_leg.parent_delivery_leg_id = parent_leg.delivery_leg_id
14560: AND child_leg.delivery_id = child.delivery_id
14561: AND parent_leg.delivery_id = parent.delivery_id

Line 14568: wsh_trip_stops stop

14564:
14565: CURSOR c_second_leg(p_delivery_id IN NUMBER) IS
14566: SELECT stop.trip_id
14567: FROM wsh_delivery_legs leg,
14568: wsh_trip_stops stop
14569: WHERE leg.parent_delivery_leg_id IS NULL
14570: AND leg.delivery_id = p_delivery_id
14571: AND leg.pick_up_stop_id = stop.stop_id;
14572: