The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT multi_org_flag
INTO x_multi_org_flag
FROM fnd_product_groups
WHERE product_group_type = 'Standard';
SELECT organization_id
INTO x_master_organization
FROM mtl_parameters
WHERE organization_id = master_organization_id
AND rownum <2;
SELECT organization_id
INTO x_master_organization
FROM mtl_parameters
WHERE organization_id = master_organization_id
AND rownum <2;
select t.conversion_rate std_conv_rate
from mtl_uom_conversions t
where t.inventory_item_id in (p_item_id, 0)
and t.uom_code= p_uom_code
and nvl(t.disable_date, trunc(sysdate) + 1) > trunc(sysdate)
and t.conversion_rate is not null
order by t.inventory_item_id desc;
select to_number(parameter_value)
into l_master_org
from msd_dem_setup_parameters
where parameter_name = 'MSD_DEM_MASTER_ORG';
select NVL(primary_uom_code,'Ea')
into l_master_uom
from mtl_system_items
where inventory_item_id = item_id
and organization_id = l_master_org;
select 1
from
msd_dem_app_instance_orgs morg,
bom_bill_of_materials bbm,
mtl_system_items msi, -- Parent
bom_inventory_components bic
where
bic.bill_sequence_id = bbm.bill_sequence_id
and bbm.organization_id = morg.organization_id
and msi.organization_id = bbm.organization_id
and msi.inventory_item_id = bbm.assembly_item_id
and msi.bom_item_type not in (C_PLANNING, C_STANDARD, C_PRODUCT_FAMILY)
and bic.optional = C_YES
and ( msi.bom_item_type = 2 or
( msi.bom_item_type = 1 and msi.ato_forecast_control in (1, 2) )
)
and bic.component_item_id = p_component_item_id;
SELECT
count(1)
FROM
mtl_system_items parent,
bom_inventory_components bic,
bom_bill_of_materials bom
WHERE
parent.bom_item_type = 5 and
parent.organization_id = bom.organization_id and
bom.ASSEMBLY_ITEM_ID = parent.inventory_item_id and
bom.bill_sequence_id = bic.bill_sequence_id and
bic.component_item_id = p_inventory_item_id and
bom.organization_id = p_org_id and
nvl(parent.ato_forecast_control, 3) <> 3;
select count(1)
from mtl_system_items itm
where inventory_item_id = (select inventory_item_id
from oe_order_lines_all l
where l.item_type_code = 'CONFIG'
and l.header_id = p_header_id
and l.org_id = p_org_id
and l.ato_line_id = p_ato_line_id )
and itm.organization_id = p_org_id
and nvl(itm.ato_forecast_control, 3) <> 3
and itm.base_item_id is not null;
select parameter_value
into c_global_currency_code
from msd_dem_setup_parameters
where parameter_name = 'MSD_DEM_CURRENCY_CODE';
select parameter_value
into c_global_rate_type
from msd_dem_setup_parameters
where parameter_name = 'MSD_DEM_CONVERSION_TYPE';
select application_column_name
from fnd_descr_flex_column_usages
where end_user_column_name = x_end_user_column_name
and descriptive_flexfield_name = x_des_fname
and application_id = x_wsh_application_id;
l_sql_stmt := ' select wrv.zone ' ||
' from wsh_region_locations wrl, ' ||
' wsh_zone_regions wzr, ' ||
' wsh_regions_v wrv ' ||
' where wrl.location_id = ''' || p_location_id || '''' ||
' and wrl.region_id = wzr.region_id ' ||
' and wzr.parent_region_id = wrv.region_id ' ||
' and wrv.region_type = 10 ' ||
' and decode(nvl(lower(''' || p_zone_attr || ''' ), ''2''), ''attribute1'', wrv.attribute1, ' ||
' ''attribute2'', wrv.attribute2, ''attribute3'',wrv.attribute3, ''attribute4'', ' ||
' wrv.attribute4, ''attribute5'', wrv.attribute5, ''attribute6'', wrv.attribute6, ' ||
' ''attribute7'', wrv.attribute7, ''attribute8'', wrv.attribute8, ''attribute9'', ' ||
' wrv.attribute9, ''attribute10'', wrv.attribute10, ''attribute11'', wrv.attribute11, ' ||
' ''attribute12'', wrv.attribute12, ''attribute13'', wrv.attribute13, ''attribute14'', ' ||
' wrv.attribute14, ''attribute15'', wrv.attribute15, ''2'') = ''1'' ' ||
' order by wrv.region_id';
select wrv.region_id
from wsh_region_locations wrl,
wsh_zone_regions wzr,
wsh_regions_v wrv
where wrl.location_id = p_location_id
and wrl.region_id = wzr.region_id
and wzr.parent_region_id = wrv.region_id
and wrv.region_type = 10
and decode(nvl(lower(p_zone_attr), '2'), 'attribute1', wrv.attribute1,
'attribute2', wrv.attribute2, 'attribute3',wrv.attribute3, 'attribute4',
wrv.attribute4, 'attribute5', wrv.attribute5, 'attribute6', wrv.attribute6,
'attribute7', wrv.attribute7, 'attribute8', wrv.attribute8, 'attribute9',
wrv.attribute9, 'attribute10', wrv.attribute10, 'attribute11', wrv.attribute11,
'attribute12', wrv.attribute12, 'attribute13', wrv.attribute13, 'attribute14',
wrv.attribute14, 'attribute15', wrv.attribute15, '2') = '1'
order by wrv.region_id;
select 1
from csd_repair_job_xref crjx
where wip_entity_id = p_txn_source_id
order by repair_job_xref_id;
select organization_id
from csd_repair_job_xref crjx
where wip_entity_id = p_txn_source_id
order by repair_job_xref_id desc;
x_sql := 'select count(cust_account_id) from hz_cust_accounts' ||
' where party_id = ' || p_party_id ||
' and ( ' || p_cust_attribute || ' <> ''1'' or ' || p_cust_attribute || ' is null)';
SELECT
inventory_item_id,
item_type_code,
link_to_line_id,
ato_line_id
FROM
oe_order_lines_all
WHERE
line_id = x_line_id;
SELECT inventory_item_id
INTO x_base_model_id
FROM oe_order_lines_all
WHERE line_id = p_top_model_line_id;
SELECT 1
FROM msd_dem_app_instance_orgs mdaio,
bom_bill_of_materials bbm,
mtl_system_items msi,
bom_inventory_components bic
WHERE
bic.component_sequence_id = x_component_sequence_id
AND bic.bill_sequence_id = bbm.bill_sequence_id
AND bbm.organization_id = mdaio.organization_id
AND msi.organization_id = bbm.organization_id
AND msi.inventory_item_id = bbm.assembly_item_id
AND msi.bom_item_type not in (C_PLANNING, C_STANDARD, C_PRODUCT_FAMILY)
AND bic.optional = C_YES;
SELECT component_sequence_id
FROM oe_order_lines_all
WHERE line_id = p_parent_line_id;
SELECT
1
FROM msd_dem_app_instance_orgs mdaio,
bom_bill_of_materials bbm,
mtl_system_items msi,
bom_inventory_components bic
WHERE
bic.component_sequence_id = x_component_sequence_id
AND bic.bill_sequence_id = bbm.bill_sequence_id
AND bbm.organization_id = mdaio.organization_id
AND msi.organization_id = bbm.organization_id
AND msi.inventory_item_id = bic.component_item_id
AND (( msi.ato_forecast_control = 3
AND bic.optional = C_YES)
OR
msi.ato_forecast_control in (1, 2));
x_sql := 'select cia.inventory_item_id ' ||
' from csp_req_line_details crld, ' ||
' csp_requirement_lines crl, ' ||
' csp_requirement_headers crh, ' ||
' jtf_tasks_b jtb, ' ||
' cs_incidents_all cia ' ||
' where crld.source_type = ''IO'' ' ||
' and crld.source_id = :1 ' ||
' and crl.requirement_line_id = crld.requirement_line_id ' ||
' and crh.requirement_header_id = crl.requirement_header_id ' ||
' and jtb.task_id = crh.task_id ' ||
' and jtb.source_object_type_code = ''SR'' ' ||
' and cia.incident_id = jtb.source_object_id ' ||
' and rownum < 2 ' ; --Bug#13561423
x_sql := ' select decode(nvl(' || p_attribute_col || ',''G''),''B'',2,1) '
|| ' from '
|| ' MTL_MATERIAL_TRANSACTIONS MMT,'
|| ' MTL_SECONDARY_INVENTORIES MSI'
|| ' where MMT.ORGANIZATION_ID = MSI.ORGANIZATION_ID'
|| ' and MMT.SUBINVENTORY_CODE = MSI.SECONDARY_INVENTORY_NAME'
|| ' and MMT.TRANSACTION_TYPE_ID = 62' -- Int Order Intr Ship
|| ' and MMT.TRANSACTION_SOURCE_TYPE_ID = 8' -- Internal Orders
|| ' and MMT.TRX_SOURCE_LINE_ID = ' || p_order_line_id
|| ' and rownum < 2 ' ;
x_sql := 'SELECT transit_type_flag FROM ahl_visit_types_b where visit_type_code = :1 and rownum < 2';