The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT /* MOAC_SQL_CHANGE */ s_ship.site_use_id,
s_ship.cust_acct_site_id,
acct_site_ship.cust_account_id,
loc_ship.postal_code,
party.party_name,
cust_acct.account_number,
party.party_id,
party_site_ship.party_site_id,
loc_ship.location_id
FROM
HZ_CUST_SITE_USES S_SHIP ,
HZ_CUST_ACCT_SITES_ALL ACCT_SITE_SHIP,
HZ_PARTY_SITES PARTY_SITE_SHIP,
HZ_LOCATIONS LOC_SHIP,
HZ_PARTIES PARTY,
HZ_CUST_ACCOUNTS_ALL CUST_ACCT
WHERE s_ship.site_use_id = p_site_org_id
AND s_ship.cust_acct_site_id = acct_site_ship.cust_acct_site_id
and acct_site_ship.cust_account_id = cust_acct.cust_account_id
and cust_acct.party_id = party.party_id
and acct_site_ship.party_site_id = party_site_ship.party_site_id
and party_site_ship.location_id = loc_ship.location_id;
SELECT
oe_order_lines.header_id,
oe_order_lines.tax_date,
oe_order_lines.pricing_quantity,
oe_order_lines.unit_selling_price,
oe_order_lines.tax_exempt_number,
oe_order_lines.tax_exempt_reason_code,
oe_order_lines.inventory_item_id,
oe_order_lines.ship_from_org_id,
oe_order_lines.fob_point_code,
oe_order_lines.tax_code,
NVL(oe_order_lines.actual_shipment_date, oe_order_lines.schedule_ship_date),
DECODE( oe_order_lines.global_attribute_category,
'JL.AR.OEXOEORD.LINES', oe_order_lines.global_attribute6,
'JL.BR.OEXOEORD.LINES', oe_order_lines.global_attribute6,
'JL.CO.OEXOEORD.LINES', oe_order_lines.global_attribute6,NULL) ,
Decode(oe_order_lines.global_attribute_category,
'JL.AR.OEXOEORD.LINES', oe_order_lines.global_attribute5,
'JL.BR.OEXOEORD.LINES', oe_order_lines.global_attribute5,
'JL.CO.OEXOEORD.LINES',oe_order_lines.global_attribute5,NULL) ,
NVL(oe_order_lines.pricing_quantity_uom, oe_order_lines.order_quantity_uom) ,
DECODE(oe_order_lines.user_item_description, NULL, 'MEMO', 'SERVICE'),
oe_order_lines.line_number ,
oe_order_lines.user_item_description
FROM oe_order_lines, oe_system_parameters
WHERE oe_order_lines.org_id = oe_system_parameters.org_id
--AND header_id = p_header_id
AND line_id = p_line_rec.line_id;
select location_id
from hr_organization_units
where organization_id = p_organization_id;
select * from
ZX_DETAIL_TAX_LINES_GT
where
application_id = l_application_id
and entity_code = l_entity_code_crsr --'OE_ORDER_HEADERS'
and event_class_code = l_event_class_code_crsr --'SALES_TRANSACTION_TAX_QUOTE'
and trx_id = p_header_id
and trx_line_id = p_line_id
and trx_level_type = l_trx_level_type_crsr; --'LINE';
select c.minimum_accountable_unit,
c.precision
into l_minimum_accountable_unit,
l_precision
from fnd_currencies c
where c.currency_code = l_currency_code;
select /* MOAC_SQL_CHANGE */ nvl(cust_type.subsequent_trx_type_id, cust_type.cust_trx_type_id)
into l_cust_trx_type_id
from ra_cust_trx_types_all cust_type,
ra_customer_trx cust_trx
where
cust_type.cust_trx_type_id = cust_trx.cust_trx_type_id
and cust_type.org_id = cust_trx.org_id
and cust_trx.customer_trx_id = l_commitment_id;
SELECT classification_code
INTO l_product_type
FROM zx_product_types_def_v
WHERE org_id = l_inventory_org_id
AND inventory_item_id = l_line_rec.inventory_item_id;
SELECT location_id
INTO l_ship_from_location_id
FROM hr_all_organization_units hu
WHERE hu.organization_id = l_ship_from_org_id;
SELECT ASGN.ORGANIZATION_ID
, hou.location_id
INTO l_poo_party_id
, l_poo_location_id
FROM RA_SALESREPS_ALL sales
, PER_ALL_ASSIGNMENTS_F ASGN
, hr_organization_units hou
WHERE ASGN.PERSON_ID = sales.PERSON_ID
AND sales.salesrep_id = l_line_rec.salesrep_id
AND sales.org_id = l_header_org_id
AND NVL(ASGN.PRIMARY_FLAG, 'Y') = 'Y'
AND hou.organization_id = ASGN.ORGANIZATION_ID
AND l_TAX_DATE
BETWEEN nvl(ASGN.EFFECTIVE_START_DATE,TO_DATE( '01011900'
, 'DDMMYYYY'))
AND nvl(ASGN.EFFECTIVE_END_DATE,TO_DATE( '31122199', 'DDMMYYYY'))
AND ASSIGNMENT_TYPE = 'E';
select location_id
into l_bill_from_location_id
from HR_ALL_ORGANIZATION_UNITS
where organization_id = p_header_rec.org_id ;
zx_global_structures_pkg.trx_line_dist_tbl.INSERT_UPDATE_FLAG(i) := NULL; -- VARCHAR2_1_tbl_type,
SELECT line_id
FROM oe_order_lines_all
WHERE header_id = p_header_id;
SELECT batch_source_id
INTO l_invoice_source_id
FROM ra_batch_sources
WHERE name = l_invoice_source;
SELECT org_id
,SOLD_TO_ORG_ID
,INVOICE_TO_ORG_ID
,ORDER_TYPE_ID
INTO l_org_id
,l_sold_to_customer_id
,l_invoice_to_org_id
,l_order_type_id
FROM oe_order_headers_all
WHERE header_id = p_header_id;
SELECT acct_site.cust_account_id
INTO l_bill_to_customer_id
FROM HZ_CUST_SITE_USES_ALL site_use ,
HZ_CUST_ACCT_SITES_ALL acct_site
WHERE site_use.site_use_id = l_invoice_to_org_id
AND site_use.cust_acct_site_id = acct_site.cust_acct_site_id;