The following lines contain the word 'select', 'insert', 'update' or 'delete':
v_SelectStmt VARCHAR2(3000);
SELECT language_code INTO l_base_lang FROM fnd_languages
WHERE installed_flag = 'B';
/* v_SelectStmt := 'SELECT DISTINCT hcas.language ' ||
'FROM hz_cust_acct_sites_all hcas,' ||
' hz_party_sites hps,'||
' wsh_new_deliveries wnd,' ||
' wsh_delivery_legs wdl,' ||
' wsh_delivery_assignments_v wda, ' ||
' wsh_locations wl ' ||
'WHERE wdl.delivery_id(+) = wnd.delivery_id ' ||
'AND wnd.delivery_id = wda.delivery_id '||
'AND wl.wsh_location_id = wnd.ultimate_dropoff_location_id ' ||
'AND wl.location_source_code = ''HZ'' ' ||
'AND hps.location_id = wl.source_location_id ' ||
'AND hcas.party_site_id = hps.party_site_id ' ||
'AND nvl(wnd.SHIPMENT_DIRECTION , ''O'') IN (''O'', ''IO'') ' ; -- J inbound logistics jckwok*/
v_SelectStmt := 'SELECT DISTINCT loc.language ' ||
v_FROM ||
'AND loc.location_id = wnd.ultimate_dropoff_location_id ' ||
'AND wnd.delivery_id = wda.delivery_id '||
'AND nvl(wnd.SHIPMENT_DIRECTION , ''O'') IN (''O'', ''IO'') ' ; -- J inbound logistics jckwok
v_SelectStmt := v_SelectStmt|| ' AND wnd.organization_id = :p_organization_id ';
v_SelectStmt := v_SelectStmt||
' AND wda.delivery_detail_id IS NOT NULL';
v_SelectStmt := v_SelectStmt||' AND wdl.delivery_leg_id in '||
'(select distinct delivery_leg_id from wsh_delivery_legs '||
'where pick_up_stop_id in (select stop_id from '||
'wsh_trip_stops where trip_id = :p_trip_id))';
v_SelectStmt := v_SelectStmt||' AND wdl.pick_up_stop_id = :p_trip_stop_id';
v_SelectStmt := v_SelectStmt||' AND wnd.delivery_id = :p_delivery_id';
v_SelectStmt := v_SelectStmt||' AND wnd.ship_method_code = :p_freight_carrier';
v_SelectStmt := v_SelectStmt||' AND wdl.delivery_leg_id IN '||
'(select distinct delivery_leg_id from wsh_delivery_legs '||
'where pick_up_stop_id in (select stop_id from '||
'wsh_trip_stops where planned_departure_date '||
'<= :p_departure_date_high))'; -- bug 1566422
v_SelectStmt := v_SelectStmt||' AND wdl.delivery_leg_id IN '||
'(select distinct delivery_leg_id from wsh_delivery_legs '||
'where pick_up_stop_id in (select stop_id from '||
'wsh_trip_stops where planned_departure_date '||
'>= :p_departure_date_low))'; -- bug 1566422
v_SelectStmt := v_SelectStmt||' AND wdl.delivery_leg_id in '||
'(select distinct delivery_leg_id from wsh_delivery_legs '||
'where pick_up_stop_id in (select stop_id from '||
'wsh_trip_stops where planned_departure_date '||
'BETWEEN :p_departure_date_low AND :p_departure_date_high))'; -- bug 1566422
v_SelectStmt := v_SelectStmt||' AND nvl(wnd.confirm_date,sysdate) <= p_doc_param_info.p_delivery_date_high '; ELSIF p_doc_param_info.p_delivery_date_high IS NULL THEN
v_SelectStmt := v_SelectStmt||' AND nvl(wnd.confirm_date,sysdate) >= p_doc_param_info.p_delivery_date_low ';
v_SelectStmt := v_SelectStmt||' AND nvl(wnd.confirm_date,sysdate) '||
'between :p_delivery_date_low AND :p_delivery_date_high ';
v_SelectStmt := v_SelectStmt||' AND wdl.delivery_leg_id = :p_delivery_leg_id';
DBMS_SQL.PARSE(l_CursorID, v_SelectStmt, DBMS_SQL.V7);
select nls_language, nls_territory
into x_nls_lang(i).nls_language, x_nls_lang(i).nls_territory
from fnd_languages
where language_code = x_nls_lang(i).lang_code;
select nls_language
into x_nls_lang(i).nls_language
from fnd_languages
where language_code = x_nls_lang(i).lang_code;