DBA Data[Home] [Help]

APPS.FTE_MLS_UTIL SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 127

	SELECT name
	FROM   wsh_trips
	WHERE  trip_id = p_trip_segment_id;
Line: 175

	SELECT 1
	FROM   fte_wsh_trips a, wsh_trips b
	WHERE  a.fte_trip_id = p_trip_id
	AND    a.wsh_trip_id <> p_trip_segment_id
	AND    a.wsh_trip_id = b.trip_id
	AND    b.status_code IN ('OP','IT');
Line: 224

	SELECT wsh_trip_id
	FROM   fte_wsh_trips
	WHERE  fte_trip_id = p_trip_id
	AND    sequence_number = ( select min(sequence_number)
				   from fte_wsh_trips
				   where fte_trip_id = p_trip_id
				   and   sequence_number > p_sequence_number );
Line: 337

	SELECT wsh_trip_id
	FROM   fte_wsh_trips
	WHERE  fte_trip_id = p_trip_id
	AND    sequence_number = ( select max(sequence_number)
				   from fte_wsh_trips
				   where fte_trip_id = p_trip_id
				   and   sequence_number < p_sequence_number );
Line: 451

	SELECT stop_id, stop_location_id
	FROM   wsh_trip_stops
	WHERE  trip_id =  p_segment_id
	AND    stop_sequence_number = ( select min(stop_sequence_number)
				   from wsh_trip_stops
				   where trip_id = p_segment_id );
Line: 534

	SELECT stop_id, stop_location_id
	FROM   wsh_trip_stops
	WHERE  trip_id =  p_segment_id
	AND    stop_sequence_number = ( select max(stop_sequence_number)
				   from wsh_trip_stops
				   where trip_id = p_segment_id );
Line: 1106

	SELECT 'x'
	FROM   wsh_trip_stops WTS,
	       wsh_delivery_legs  WDL,
	       wsh_new_deliveries WND
	WHERE  WTS.trip_id      = p_trip_segment_rec.trip_id
	AND    WND.delivery_id  = WDL.delivery_id
	AND    WND.status_code IN ( 'IT', 'CL' )
	AND    (
		    WDL.pick_up_stop_id  = WTS.STOP_ID
	         OR WDL.drop_off_stop_id = WTS.STOP_ID
	       );
Line: 1148

	SELECT 'x'
	FROM   wsh_trip_stops WTS,
	       wsh_delivery_legs  WDL
	WHERE  WTS.trip_id       = p_trip_segment_id
	AND    WDL.delivery_id  <> p_delivery_id
	AND    (
		    WDL.pick_up_stop_id  = WTS.STOP_ID
	         OR WDL.drop_off_stop_id = WTS.STOP_ID
	       );
Line: 1213

	SELECT 'x'
	FROM   wsh_delivery_legs  WDL,
	       wsh_new_deliveries WND
	WHERE  WND.delivery_id  = WDL.delivery_id
	AND    WND.status_code IN ( 'IT', 'CL' )
	AND    (
		    WDL.pick_up_stop_id  = p_trip_stop_id
	         OR WDL.drop_off_stop_id = p_trip_stop_id
	       );
Line: 1261

	SELECT ship_method_code
	FROM   wsh_carrier_services
	WHERE  carrier_id     = p_carrier_id
	AND    enabled_flag   = 'Y'
	AND    (
		  (
		         p_mode_of_transport IS NULL
		     AND mode_of_transport   IS NULL
		  )
		  OR
		  (
		         p_mode_of_transport IS NOT NULL
		     AND mode_of_transport = p_mode_of_transport
		  )
	       )
	AND    (
		  (
		         p_service_level IS NULL
		     AND service_level   IS NULL
		  )
		  OR
		  (
		          p_service_level IS NOT NULL
		     AND service_level = p_service_level
		  )
	       );
Line: 1339

        SELECT  ui_location_code, address1,address2,
                address3,city,state,country,postal_code
        FROM    wsh_locations
        WHERE   wsh_location_id = c_location_id;
Line: 1402

	SELECT hz.party_name name
	FROM   hz_parties hz, wsh_carriers wc
	WHERE  hz.party_id = wc.carrier_id
	AND    wc.carrier_id =  c_carrier_id;
Line: 1441

	   Select delivery_leg_id
	   from   wsh_delivery_legs wdl, wsh_trip_stops wts1, wsh_trip_stops wts2,wsh_trips wt
	   where  wdl.pick_up_stop_id    = wts1.stop_id
	   and    wdl.drop_off_stop_id   = wts2.stop_id
	   and    wts1.trip_id           = wt.trip_id
	   and    wts2.trip_id           = wt.trip_id
	   and    wt.trip_id             = c_trip_segment_id;
Line: 1522

	SELECT meaning mode_of_transport_meaning
	FROM fnd_lookup_values_vl
	WHERE lookup_type = 'WSH_MODE_OF_TRANSPORT'
	AND lookup_code = c_mode_code;
Line: 1568

	SELECT meaning service_type_meaning
	FROM fnd_lookup_values_vl
	WHERE lookup_type = 'WSH_SERVICE_LEVELS'
	AND lookup_code = c_service_code;
Line: 1617

	SELECT  address_line_1,address_line_2,
		address_line_3,town_or_city,
		region_1,region_2,region_3,
		country,postal_code
	FROM	wsh_hr_locations_v
	WHERE  	location_id = c_location_id;
Line: 1626

	SELECT  address1,address2,
		address3,city,state,country,postal_code
	FROM	wsh_locations
	WHERE  	wsh_location_id = c_location_id;
Line: 1693

	SELECT carrier_contact_id
	FROM wsh_trips
	WHERE load_tender_number = c_tender_number;
Line: 1700

	SELECT 	party_rel.party_name ContactName,
		hcp.email_address ContactEmail,
		hcp.contact_point_type ContactPointType
	FROM
		hz_relationships rel,
		hz_party_sites hps,
		hz_org_contacts hoc,
		hz_contact_points hcp,
		hz_parties party_rel
	WHERE
		hps.party_id = rel.object_id and
		hps.party_site_id = hoc.party_site_id and
		hoc.party_relationship_id = rel.relationship_id and
		party_rel.party_id = rel.subject_id and
		hcp.owner_table_id = rel.party_id and
		hcp.owner_table_name = 'HZ_PARTIES' and
		rel.party_id = c_contact_id;
Line: 1842

        SELECT distinct(org.name) org_name
        FROM wsh_delivery_legs dlegs, wsh_new_deliveries dlvy,
                wsh_trip_stops stops, hr_organization_units  org
        WHERE dlegs.delivery_id = dlvy.delivery_id
        AND dlegs.pick_up_stop_id  = stops.stop_id
        AND org.organization_id = dlvy.organization_id
        AND stops.stop_id = c_stop_id;
Line: 1882

        SELECT distinct(org.name) org_name
        FROM wsh_delivery_legs dlegs, wsh_new_deliveries dlvy,
                wsh_trip_stops stops, hr_organization_units  org,
				wsh_trips trips
        WHERE dlegs.delivery_id = dlvy.delivery_id
        AND dlegs.pick_up_stop_id  = stops.stop_id
        AND org.organization_id = dlvy.organization_id
        AND stops.trip_id = trips.trip_id
	AND trips.trip_id = c_trip_id;
Line: 1924

        SELECT distinct(dlvy.organization_id) org_id
        FROM wsh_delivery_legs dlegs, wsh_new_deliveries dlvy,
                wsh_trip_stops stops, wsh_trips trips
        WHERE dlegs.delivery_id = dlvy.delivery_id
        AND dlegs.pick_up_stop_id  = stops.stop_id
        AND stops.trip_id = trips.trip_id
	AND trips.trip_id = c_trip_id;
Line: 1979

	SELECT fu.email_address as email,
	       fu.fax as fax,
	       nvl(hp.party_name,fu.user_name) as name,
	       hp.primary_phone_number as phone
	FROM   fnd_user fu,
	       hz_parties hp
	WHERE  fu.person_party_id = hp.party_id(+)
	and    fu.user_name = c_shipper_username;
Line: 2131

	SELECT carrier_id
	FROM
	wsh_trips
	where load_tender_number = tender_id;
Line: 2379

	SELECT message_text INTO x_message_text
	FROM FND_NEW_MESSAGES
	WHERE message_name = p_message_name
	AND LANGUAGE_CODE = userenv('LANG')
	AND APPLICATION_ID = 716;
Line: 2414

  SELECT meaning
  FROM Fnd_lookup_values_vl
  WHERE LOOKUP_TYPE = p_lookup_type
  AND LOOKUP_CODE = P_lookup_code;
Line: 2515

	SELECT decode(sites.supplier_site_id,null,car.supplier_site_id,
		sites.supplier_site_id), car.currency_code
	FROM WSH_ORG_CARRIER_SITES org_sites,
		 WSH_CARRIER_SITES sites,
		 WSH_CARRIERS car, wsh_trips trips
	WHERE org_sites.ORGANIZATION_ID = l_organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND car.CARRIER_ID = trips.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	and trips.trip_id = P_ENTITY_ID;
Line: 2529

	SELECT decode(sites.supplier_site_id,null,car.supplier_site_id,
	sites.supplier_site_id), car.currency_code FROM WSH_ORG_CARRIER_SITES org_sites,
		 WSH_CARRIER_SITES sites,
		 WSH_CARRIERS car, wsh_new_deliveries del
	WHERE org_sites.ORGANIZATION_ID = del.organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND car.CARRIER_ID = del.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	AND del.delivery_id = P_ENTITY_ID;
Line: 2542

	SELECT decode(sites.supplier_site_id,null,car.supplier_site_id,
		sites.supplier_site_id), car.currency_code
	FROM WSH_ORG_CARRIER_SITES org_sites,
		 WSH_CARRIER_SITES sites,
		 WSH_CARRIERS car
	WHERE org_sites.ORGANIZATION_ID = l_organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	AND car.carrier_id = l_carrier_id;
Line: 2555

	SELECT sites.carrier_site_id, sites.supplier_site_id
	FROM WSH_CARRIER_SITES sites,
		WSH_ORG_CARRIER_SITES org_sites,
		WSH_CARRIERS car
	WHERE org_sites.ORGANIZATION_ID = l_organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	AND car.carrier_id = l_carrier_id;
Line: 2615

				SELECT CARRIER_ID INTO l_carrier_id
				FROM WSH_TRIPS
				WHERE TRIP_ID = p_entity_id;
Line: 2634

			SELECT CARRIER_ID INTO l_carrier_id
			FROM WSH_NEW_DELIVERIES
			WHERE DELIVERY_ID = p_entity_id;
Line: 2640

		SELECT ORGANIZATION_ID INTO l_organization_id FROM WSH_NEW_DELIVERIES
		WHERE DELIVERY_ID = p_entity_id;
Line: 2650

			SELECT mp. organization_id
			INTO l_organization_id
			FROM   hr_organization_units hou,mtl_parameters mp
			WHERE  hou.organization_id = mp.organization_id
			AND  hou.location_id  = p_entity_id
			AND  trunc(sysdate) <= nvl( hou.date_to, trunc(sysdate));
Line: 2712

			SELECT SUPPLIER_ID,SUPPLIER_SITE_ID,CURRENCY_CODE
			INTO l_vendor_id,l_vendor_site_id,l_carrier_currency
			FROM WSH_CARRIERS WHERE CARRIER_ID = l_carrier_id;
Line: 2729

			SELECT PAYMENT_CURRENCY_CODE INTO X_CURRENCY_CODE
			FROM po_vendor_sites_all
			WHERE vendor_site_id = l_vendor_site_id
			AND PAY_SITE_FLAG = 'Y';
Line: 2743

			SELECT PAYMENT_CURRENCY_CODE INTO X_CURRENCY_CODE
			FROM po_vendors
			WHERE vendor_id = l_vendor_id;
Line: 2846

	SELECT decode(sites.supplier_site_id,null,car.supplier_site_id,
		sites.supplier_site_id), car.currency_code,
		car.supplier_id,sites.carrier_site_id
	FROM WSH_ORG_CARRIER_SITES org_sites,
		 WSH_CARRIER_SITES sites,
		 WSH_CARRIERS car, wsh_trips trips
	WHERE org_sites.ORGANIZATION_ID = l_organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND car.CARRIER_ID = trips.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	and trips.trip_id = l_entity_id;
Line: 2861

	SELECT decode(sites.supplier_site_id,null,car.supplier_site_id,
	sites.supplier_site_id), car.currency_code,car.supplier_id,
	sites.carrier_site_id
	FROM WSH_ORG_CARRIER_SITES org_sites,
		 WSH_CARRIER_SITES sites,
		 WSH_CARRIERS car, wsh_new_deliveries del
	WHERE org_sites.ORGANIZATION_ID = del.organization_id
	AND sites.carrier_site_id = org_sites.carrier_site_id
	AND sites.carrier_id = car.carrier_id
	AND car.CARRIER_ID = del.carrier_id
	AND org_sites.ENABLED_FLAG = 'Y'
	AND del.delivery_id = l_entity_id;
Line: 2982

		SELECT PAYMENT_CURRENCY_CODE INTO X_CURRENCY_CODE
		FROM po_vendor_sites_all
		WHERE vendor_site_id = l_vendor_site_id
		AND PAY_SITE_FLAG = 'Y';
Line: 3105

	SELECT mp. organization_id
	FROM   hr_organization_units hou,mtl_parameters mp
	WHERE  hou.organization_id = mp.organization_id
	AND  hou.location_id  = l_stop_loc_id
	AND  trunc(sysdate) <= nvl( hou.date_to, trunc(sysdate));
Line: 3112

	SELECT dlvy.ORGANIZATION_ID
	FROM WSH_TRIP_STOPS stops, WSH_DELIVERY_LEGS leg,
		WSH_NEW_DELIVERIES dlvy
	WHERE stops.stop_id = leg.pick_up_stop_id
	AND leg.delivery_id = dlvy.delivery_id
	AND stops.stop_id = l_stop_id;
Line: 3164

	SELECT shipments_type_flag  INTO l_typeflag
	FROM WSH_TRIPS
	WHERE TRIP_ID = p_trip_id;
Line: 3281

SELECT stop_location_id, planned_arrival_date, planned_departure_date ,
	stops.stop_id
FROM wsh_trip_stops stops, wsh_trips trips
WHERE trips.trip_id = p_trip_id
	and trips.trip_id = stops.trip_id
ORDER BY PLANNED_ARRIVAL_DATE,
	 STOP_SEQUENCE_NUMBER;