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 2194: from wsh_delivery_legs wdl, wsh_trip_stops wts

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

Line 2247: wsh_trip_stops st,

2243: CURSOR c_first_ship_method (p_delivery_id IN number)IS
2244: SELECT wt.ship_method_code
2245: FROM wsh_new_deliveries del,
2246: wsh_delivery_legs dlg,
2247: wsh_trip_stops st,
2248: wsh_trips wt
2249: WHERE del.delivery_id = dlg.delivery_id
2250: AND dlg.pick_up_stop_id = st.stop_id
2251: AND del.initial_pickup_location_id = st.stop_location_id

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

2613: SELECT wt.trip_id , wt.carrier_id, wt.ship_method_code, wt.mode_of_transport,
2614: --OTM R12
2615: wt.tp_plan_name
2616: --
2617: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_trips wt
2618: WHERE wdl.pick_up_stop_id=wts.stop_id
2619: AND wdl.delivery_id=v_del_id
2620: AND wts.trip_id=wt.trip_id;
2621:

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

2657:
2658:
2659: CURSOR Get_Del_First_Trip(v_del_id NUMBER) IS
2660: SELECT wts.trip_id
2661: FROM wsh_delivery_legs wdl, wsh_trip_stops wts, wsh_new_deliveries wnd
2662: WHERE wdl.pick_up_stop_id=wts.stop_id
2663: AND wnd.initial_pickup_location_id = wts.stop_location_id
2664: AND wnd.delivery_id = wdl.delivery_id
2665: AND wnd.delivery_id=v_del_id;

Line 2671: FROM wsh_trip_stops

2667:
2668: --bug 3314353 -- jckwok
2669: CURSOR prev_stop_csr ( p_trip_id IN NUMBER, p_stop_sequence IN NUMBER) IS
2670: SELECT stop_id
2671: FROM wsh_trip_stops
2672: WHERE trip_id = p_trip_id
2673: AND status_code IN ('OP','AR')
2674: AND stop_sequence_number < p_stop_sequence
2675: AND nvl(shipments_type_flag,'0') <> 'I' --bugfix 3925963

Line 2681: FROM wsh_trip_stops

2677:
2678: --bug 3314353 -- jckwok
2679: CURSOR get_stops_csr (p_trip_id IN NUMBER) IS
2680: SELECT stop_id,shipments_type_flag,stop_location_id --bugfix 3925963
2681: FROM wsh_trip_stops
2682: WHERE trip_id = p_trip_id
2683: AND status_code IN ('OP','AR')
2684: ORDER BY stop_sequence_number;
2685:

Line 2695: FROM wsh_trip_stops

2691:
2692: --bug 3314353 -- jckwok
2693: CURSOR stop_sequence_number_csr (p_stop_id IN NUMBER) IS
2694: SELECT stop_sequence_number
2695: FROM wsh_trip_stops
2696: WHERE stop_id = p_stop_id;
2697:
2698: -- Added for bug 4493263
2699: CURSOR c_delv_trip_id_cursor( t_delivery_id NUMBER ) IS

Line 2700: select distinct trip_id from wsh_trip_stops

2696: WHERE stop_id = p_stop_id;
2697:
2698: -- Added for bug 4493263
2699: CURSOR c_delv_trip_id_cursor( t_delivery_id NUMBER ) IS
2700: select distinct trip_id from wsh_trip_stops
2701: where stop_id in
2702: ( select distinct pick_up_stop_id
2703: from wsh_delivery_legs
2704: where delivery_id = t_delivery_id );

Line 2917: l_stop_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;

2913: l_close_del_cnt NUMBER := 0;
2914: l_confirm_del_cnt NUMBER := 0;
2915:
2916: /*new variable */
2917: l_stop_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;
2918: l_trip_rec WSH_TRIPS_PVT.trip_rec_type;
2919: -- bug 2263249
2920: l_wms_enabled_flag BOOLEAN;
2921: -- bug 2343058

Line 2952: l_cc_stop_attr_tab WSH_TRIP_STOPS_PVT.Stop_Attr_Tbl_Type;

2948: --dummy tables for calling validate_constraint_wrapper
2949: l_cc_del_attr_tab WSH_NEW_DELIVERIES_PVT.Delivery_Attr_Tbl_Type;
2950: l_cc_det_attr_tab WSH_GLBL_VAR_STRCT_GRP.Delivery_Details_Attr_Tbl_Type;
2951: l_cc_trip_attr_tab WSH_TRIPS_PVT.Trip_Attr_Tbl_Type;
2952: l_cc_stop_attr_tab WSH_TRIP_STOPS_PVT.Stop_Attr_Tbl_Type;
2953: l_cc_in_ids wsh_util_core.id_tab_type;
2954: l_cc_fail_ids wsh_util_core.id_tab_type;
2955: l_cc_carrier_id NUMBER;
2956: l_cc_mode VARCHAR2(30);

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

7050:
7051: if u_stop_rows.count > 0 then
7052:
7053: IF l_debug_on THEN
7054: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7055: END IF;
7056: --
7057: wsh_trip_stops_actions.change_status(
7058: p_stop_rows => u_stop_rows,

Line 7057: wsh_trip_stops_actions.change_status(

7053: IF l_debug_on THEN
7054: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7055: END IF;
7056: --
7057: wsh_trip_stops_actions.change_status(
7058: p_stop_rows => u_stop_rows,
7059: p_action => 'CLOSE',
7060: p_actual_date => nvl(p_actual_dep_date,sysdate),
7061: p_defer_interface_flag => p_defer_interface_flag, -- bug 1578251

Line 7737: wsh_Trip_stops wts

7733: CURSOR delivery_stops_csr (p_delivery_id NUMBER)
7734: IS
7735: SELECT stop_id
7736: FROM wsh_delivery_legs wdl,
7737: wsh_Trip_stops wts
7738: WHERE wdl.delivery_id = p_delivery_id
7739: AND (
7740: wdl.pick_up_stop_id = wts.stop_id
7741: OR wdl.drop_off_stop_id = wts.stop_id

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

7927: --
7928: -- Debug Statements
7929: --
7930: IF l_debug_on THEN
7931: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7932: END IF;
7933: --
7934: wsh_trip_stops_actions.change_status
7935: (

Line 7934: wsh_trip_stops_actions.change_status

7930: IF l_debug_on THEN
7931: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS',WSH_DEBUG_SV.C_PROC_LEVEL);
7932: END IF;
7933: --
7934: wsh_trip_stops_actions.change_status
7935: (
7936: p_stop_rows => l_stop_rows,
7937: p_action => 'CLOSE',
7938: p_actual_date => p_in_rec.actual_date,

Line 8045: wsh_trip_stops pu_stop,

8041: pu_stop.status_code pu_status,
8042: dg.drop_off_stop_id,
8043: do_stop.status_code do_status
8044: FROM wsh_delivery_legs dg,
8045: wsh_trip_stops pu_stop,
8046: wsh_trip_stops do_stop
8047: WHERE dg.delivery_id = l_delivery_id
8048: AND pu_stop.stop_id = dg.pick_up_stop_id
8049: AND do_stop.stop_id = dg.drop_off_stop_id;

Line 8046: wsh_trip_stops do_stop

8042: dg.drop_off_stop_id,
8043: do_stop.status_code do_status
8044: FROM wsh_delivery_legs dg,
8045: wsh_trip_stops pu_stop,
8046: wsh_trip_stops do_stop
8047: WHERE dg.delivery_id = l_delivery_id
8048: AND pu_stop.stop_id = dg.pick_up_stop_id
8049: AND do_stop.stop_id = dg.drop_off_stop_id;
8050:

Line 8597: wsh_trip_stops st1,

8593: SELECT dg.delivery_leg_id leg_id,
8594: st1.stop_location_id pickup,
8595: st2.stop_location_id dropoff
8596: FROM wsh_delivery_legs dg,
8597: wsh_trip_stops st1,
8598: wsh_trip_stops st2
8599: WHERE dg.delivery_id = p_delivery_id AND
8600: st1.stop_id = dg.pick_up_stop_id AND
8601: st2.stop_id = dg.drop_off_stop_id AND

Line 8598: wsh_trip_stops st2

8594: st1.stop_location_id pickup,
8595: st2.stop_location_id dropoff
8596: FROM wsh_delivery_legs dg,
8597: wsh_trip_stops st1,
8598: wsh_trip_stops st2
8599: WHERE dg.delivery_id = p_delivery_id AND
8600: st1.stop_id = dg.pick_up_stop_id AND
8601: st2.stop_id = dg.drop_off_stop_id AND
8602: st1.stop_location_id = l_pickup_location_id;

Line 8607: wsh_trip_stops st1,

8603:
8604: CURSOR dropoff_delivery_legs(l_pickup_location_id IN NUMBER) IS
8605: SELECT count(*)
8606: FROM wsh_delivery_legs dg,
8607: wsh_trip_stops st1,
8608: wsh_trip_stops st2
8609: WHERE dg.delivery_id = p_delivery_id AND
8610: st1.stop_id = dg.pick_up_stop_id AND
8611: st2.stop_id = dg.drop_off_stop_id AND

Line 8608: wsh_trip_stops st2

8604: CURSOR dropoff_delivery_legs(l_pickup_location_id IN NUMBER) IS
8605: SELECT count(*)
8606: FROM wsh_delivery_legs dg,
8607: wsh_trip_stops st1,
8608: wsh_trip_stops st2
8609: WHERE dg.delivery_id = p_delivery_id AND
8610: st1.stop_id = dg.pick_up_stop_id AND
8611: st2.stop_id = dg.drop_off_stop_id AND
8612: st2.stop_location_id = l_pickup_location_id;

Line 9806: wsh_trip_stops wts

9802: CURSOR stop_csr(p_delivery_id IN NUMBER, p_location_id IN NUMBER)
9803: IS
9804: SELECT stop_id
9805: FROM wsh_delivery_legs wdl,
9806: wsh_trip_stops wts
9807: WHERE wdl.delivery_id = p_delivery_id
9808: AND wdl.pick_up_stop_id = wts.stop_id
9809: AND wts.stop_location_id = p_location_id;
9810: --

Line 9833: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;

9829: l_return_status VARCHAR2(10);
9830: l_location_name VARCHAR2(60);
9831:
9832: -- J+ Internal Location
9833: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;
9834: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
9835: l_trip_id_tab wsh_util_core.id_tab_type;
9836: l_success_trip_ids wsh_util_core.id_tab_type;
9837: -- End of J+ Internal Location

Line 9834: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;

9830: l_location_name VARCHAR2(60);
9831:
9832: -- J+ Internal Location
9833: l_physical_stop_id WSH_TRIP_STOPS.physical_stop_id%TYPE;
9834: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
9835: l_trip_id_tab wsh_util_core.id_tab_type;
9836: l_success_trip_ids wsh_util_core.id_tab_type;
9837: -- End of J+ Internal Location
9838: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;

Line 9838: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;

9834: l_physical_location_id WSH_TRIP_STOPS.physical_location_id%TYPE;
9835: l_trip_id_tab wsh_util_core.id_tab_type;
9836: l_success_trip_ids wsh_util_core.id_tab_type;
9837: -- End of J+ Internal Location
9838: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;
9839: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;
9840: l_trip_rec WSH_TRIPS_PVT.TRIP_REC_TYPE;
9841: --
9842: l_debug_on BOOLEAN;

Line 9839: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;

9835: l_trip_id_tab wsh_util_core.id_tab_type;
9836: l_success_trip_ids wsh_util_core.id_tab_type;
9837: -- End of J+ Internal Location
9838: l_stop_rec WSH_TRIP_STOPS_PVT.TRIP_STOP_REC_TYPE;
9839: l_pub_stop_rec WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;
9840: l_trip_rec WSH_TRIPS_PVT.TRIP_REC_TYPE;
9841: --
9842: l_debug_on BOOLEAN;
9843: --

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

9935: --
9936: -- Debug Statements
9937: --
9938: IF l_debug_on THEN
9939: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_GRP.GET_STOP_DETAILS_PVT',WSH_DEBUG_SV.C_PROC_LEVEL);
9940: END IF;
9941: --
9942: wsh_trip_stops_grp.get_stop_details_pvt
9943: (p_stop_id => stop_rec.stop_id,

Line 9942: wsh_trip_stops_grp.get_stop_details_pvt

9938: IF l_debug_on THEN
9939: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_GRP.GET_STOP_DETAILS_PVT',WSH_DEBUG_SV.C_PROC_LEVEL);
9940: END IF;
9941: --
9942: wsh_trip_stops_grp.get_stop_details_pvt
9943: (p_stop_id => stop_rec.stop_id,
9944: x_stop_rec => l_stop_rec,
9945: x_return_status => l_return_status);
9946: --

Line 10009: UPDATE wsh_trip_stops

10005: --
10006: --
10007: -- J+ Internal Locations, along with new location, update
10008: -- physical_stop_id and physical_location_id
10009: UPDATE wsh_trip_stops
10010: SET stop_location_id = p_location_id,
10011: last_update_date = SYSDATE,
10012: last_updated_by = FND_GLOBAL.USER_ID,
10013: last_update_login = FND_GLOBAL.LOGIN_ID,

Line 10174: -- wsh_delivery_legs and wsh_trip_stops

10170: -- First row found is enough
10171:
10172: -- bug 4891897, sql 15038247
10173: -- 1) wsh_delivery_trips_v is replaced with the join of
10174: -- wsh_delivery_legs and wsh_trip_stops
10175: -- 2) query is flattened instead of using the subquery for lower sharable memory
10176:
10177: CURSOR Check_Last_Trip (l_delivery_id NUMBER) IS
10178: SELECT s1.trip_id

Line 10179: FROM wsh_trip_stops s1,

10175: -- 2) query is flattened instead of using the subquery for lower sharable memory
10176:
10177: CURSOR Check_Last_Trip (l_delivery_id NUMBER) IS
10178: SELECT s1.trip_id
10179: FROM wsh_trip_stops s1,
10180: wsh_delivery_legs dl1,
10181: wsh_new_deliveries d1,
10182: wsh_trip_stops s2,
10183: wsh_delivery_legs dl2

Line 10182: wsh_trip_stops s2,

10178: SELECT s1.trip_id
10179: FROM wsh_trip_stops s1,
10180: wsh_delivery_legs dl1,
10181: wsh_new_deliveries d1,
10182: wsh_trip_stops s2,
10183: wsh_delivery_legs dl2
10184: WHERE d1.delivery_id <> l_delivery_id
10185: AND s1.stop_id = dl1.pick_up_stop_id
10186: AND d1.delivery_id = dl1.delivery_id

Line 10285: FROM wsh_delivery_legs d, wsh_trip_stops s

10281: WHERE delivery_id = x_delivery_id;
10282:
10283: CURSOR check_shared_trip(x_delivery_leg_id NUMBER) IS
10284: SELECT count(s.trip_id ), min(s.trip_id)
10285: FROM wsh_delivery_legs d, wsh_trip_stops s
10286: WHERE d.pick_up_stop_id = s.stop_id
10287: AND s.trip_id = (SELECT s1.trip_id
10288: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10289: WHERE d1.delivery_leg_id = x_delivery_leg_id

Line 10288: FROM wsh_trip_stops s1, wsh_delivery_legs d1

10284: SELECT count(s.trip_id ), min(s.trip_id)
10285: FROM wsh_delivery_legs d, wsh_trip_stops s
10286: WHERE d.pick_up_stop_id = s.stop_id
10287: AND s.trip_id = (SELECT s1.trip_id
10288: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10289: WHERE d1.delivery_leg_id = x_delivery_leg_id
10290: AND s1.stop_id = d1.pick_up_stop_id);
10291:
10292: -- Hiding project

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

10293: -- count('CONSOLIDATION') should be 1
10294:
10295: CURSOR check_shared_trip_consol(x_delivery_leg_id NUMBER) IS
10296: SELECT count(*), min(s.trip_id)
10297: FROM wsh_new_deliveries n, wsh_delivery_legs d, wsh_trip_stops s
10298: WHERE n.delivery_id = d.delivery_id
10299: AND d.pick_up_stop_id = s.stop_id
10300: AND s.trip_id = (SELECT s1.trip_id
10301: FROM wsh_trip_stops s1, wsh_delivery_legs d1

Line 10301: FROM wsh_trip_stops s1, wsh_delivery_legs d1

10297: FROM wsh_new_deliveries n, wsh_delivery_legs d, wsh_trip_stops s
10298: WHERE n.delivery_id = d.delivery_id
10299: AND d.pick_up_stop_id = s.stop_id
10300: AND s.trip_id = (SELECT s1.trip_id
10301: FROM wsh_trip_stops s1, wsh_delivery_legs d1
10302: WHERE d1.delivery_leg_id = x_delivery_leg_id
10303: AND s1.stop_id = d1.pick_up_stop_id)
10304: AND d.parent_delivery_leg_id IS NULL;
10305:

Line 11618: from wsh_trip_stops wts,

11614:
11615: CURSOR check_del_assigned(p_del_id IN NUMBER) IS
11616: select wts.trip_id,
11617: wt.rank_id
11618: from wsh_trip_stops wts,
11619: wsh_delivery_legs wdl,
11620: wsh_trips wt
11621: where wdl.delivery_id = p_del_id
11622: and wts.stop_id = wdl.pick_up_stop_id

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

12787: s1.planned_arrival_date pu_ar_date,
12788: s1.planned_departure_date pu_dep_date,
12789: s2.planned_arrival_date do_ar_date,
12790: s2.planned_departure_date do_dep_date
12791: from wsh_trip_stops s1, wsh_trip_stops s2, wsh_delivery_legs l, wsh_new_deliveries d, wsh_trips t
12792: where s1.stop_id = l.pick_up_stop_id
12793: and s2.stop_id = l.drop_off_stop_id
12794: and l.delivery_id = d.delivery_id
12795: and d.delivery_id = p_parent_del_id

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

12818: */
12819: -- check if the trip the delivery is assigned to is valid
12820: cursor c_check_trips(p_delivery_id in number) is
12821: select l.delivery_leg_id, s1.trip_id
12822: from wsh_delivery_legs l, wsh_trip_stops s1, wsh_new_deliveries d
12823: where l.delivery_id = p_delivery_id
12824: and d.delivery_id = l.delivery_id
12825: and d.initial_pickup_location_id = s1.stop_location_id
12826: and s1.stop_id = l.pick_up_stop_id;

Line 12854: from wsh_trip_stops s1, wsh_trip_stops s2,

12850: -- along with the original trip.
12851:
12852: cursor c_get_trip_siblings(p_trip_id in number) is
12853: select distinct s2.trip_id
12854: from wsh_trip_stops s1, wsh_trip_stops s2,
12855: wsh_delivery_legs l1, wsh_delivery_legs l2
12856: where s1.trip_id = p_trip_id
12857: and s1.stop_id = l1.pick_up_stop_id
12858: and l1.delivery_id = l2.delivery_id

Line 12864: from wsh_trip_stops s, wsh_delivery_legs l

12860:
12861:
12862: cursor c_chil_del_trips(p_delivery_id in number) is
12863: select s.trip_id
12864: from wsh_trip_stops s, wsh_delivery_legs l
12865: where l.delivery_id = p_delivery_id
12866: and l.pick_up_stop_id = s.stop_id;
12867:
12868: l_parent_trip_id NUMBER;

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

13604: x_return_status OUT NOCOPY VARCHAR2) IS
13605:
13606: CURSOR c_check_parent_exists(p_child_delivery_id in number, p_parent_delivery_id in number) IS
13607: select l1.delivery_id, l2.delivery_id, l1.delivery_leg_id, s.trip_id
13608: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s
13609: where l1.parent_delivery_leg_id = l2.delivery_leg_id
13610: and l1.delivery_id = p_child_delivery_id
13611: and l2.delivery_id = NVL(p_parent_delivery_id, l2.delivery_id)
13612: and d.delivery_id = l1.delivery_id

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

13622: and rownum = 1;
13623:
13624: CURSOR c_get_children(p_parent_delivery_id IN NUMBER) is
13625: select l1.delivery_id, l1.delivery_leg_id, s.trip_id
13626: from wsh_delivery_legs l1, wsh_delivery_legs l2, wsh_new_deliveries d, wsh_trip_stops s
13627: where l1.parent_delivery_leg_id = l2.delivery_leg_id
13628: and l2.delivery_id = p_parent_delivery_id
13629: and d.delivery_id = l1.delivery_id
13630: and d.status_code = 'OP'

Line 14360: wsh_trip_stops stop

14356: FROM wsh_new_deliveries child,
14357: wsh_new_deliveries parent,
14358: wsh_delivery_legs child_leg,
14359: wsh_delivery_legs parent_leg,
14360: wsh_trip_stops stop
14361: WHERE child_leg.delivery_id = p_delivery_id
14362: AND child_leg.parent_delivery_leg_id = parent_leg.delivery_leg_id
14363: AND child_leg.delivery_id = child.delivery_id
14364: AND parent_leg.delivery_id = parent.delivery_id

Line 14371: wsh_trip_stops stop

14367:
14368: CURSOR c_second_leg(p_delivery_id IN NUMBER) IS
14369: SELECT stop.trip_id
14370: FROM wsh_delivery_legs leg,
14371: wsh_trip_stops stop
14372: WHERE leg.parent_delivery_leg_id IS NULL
14373: AND leg.delivery_id = p_delivery_id
14374: AND leg.pick_up_stop_id = stop.stop_id;
14375: