The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT OH.ORDER_NUMBER ,
OH.HEADER_ID,
OH.ORG_ID,
OL.ordered_quantity
FROM OE_ORDER_HEADERS_ALL OH,
OE_ORDER_LINES_ALL OL
WHERE OH.HEADER_ID = OL.HEADER_ID AND
OL.LINE_ID = p_line_id;
l_line_rec.operation := OE_Globals.G_OPR_UPDATE ;
SELECT OH.ORDER_NUMBER ,
OH.HEADER_ID,
OL.ordered_quantity,
oh.sold_to_org_id,
oh.sold_to_contact_id,
oh.Order_type_id,
oh.transactional_curr_code,
oh.accounting_rule_id,
oh.ship_to_org_id,
oh.salesrep_id,
oh.sold_from_org_id,
oh.ship_from_org_id,
/*Bug 2360833 */
oh.invoice_to_org_id,
-- oh.ship_to_org_id,
oh.agreement_id,
-- oh.ship_to_contact_id,
oh.invoice_to_contact_id,
oh.payment_type_code,
oh.credit_card_code,
oh.credit_card_holder_name,
oh.credit_card_number,
oh.credit_card_expiration_date,
oh.check_number,
oh.payment_amount,
/*Bug 2360833 */
ol.order_quantity_uom,
ol.price_list_id,
ol.ordered_item_id,
ol.ordered_item,
ol.inventory_item_id,
ol.item_identifier_type,
ol.unit_list_price,
ol.unit_selling_price,
oh.ship_to_contact_id ,
ol.line_type_id,
ol.commitment_id,
oh.org_id
FROM OE_ORDER_HEADERS_ALL OH,
OE_ORDER_LINES_ALL OL
WHERE OH.HEADER_ID = OL.HEADER_ID AND
OL.LINE_ID = p_line_id;
Select count(*)into l_count from oe_order_lines_all
where reference_line_id = p_line_id;
Select booking_status_type_id,
name
From ota_booking_status_types
Where active_flag = 'Y'
And default_flag = 'Y'
And type = 'W'
and business_group_id = L_BUSINESS_GROUP_ID;
select con.phone_country_code||' '|| con.phone_area_code||' '||decode(con.contact_point_type,'TLX',con.telex_number,con.phone_number) from hz_contact_points con, hz_cust_account_roles acct_role
where con.owner_table_id=acct_role.party_id
and con.Primary_Flag='Y'
and acct_role.cust_account_role_id=l_stud_cont
And con.owner_table_name = 'HZ_PARTIES'
And con.contact_point_type not in ('EDI', 'EMAIL', 'WEB');
Select phone_country_code||' '||phone_area_code ||' '||
decode(con.contact_point_type,'TLX',con.telex_number,con.phone_number)
phone_number
From HZ_CONTACT_POINTS con,
HZ_CUST_ACCOUNT_ROLES car
where car.party_id = con.owner_table_id
and con.owner_table_name = 'HZ_PARTIES'
and con.contact_point_type not in ('EDI','EMAIL','WEB')
and car.cust_account_role_id = l_stud_cont
and nvl(con.phone_line_type,con.contact_point_type) = 'FAX';
Select rel_party.email_address
From HZ_CUST_ACCOUNT_ROLES acct_role,
HZ_PARTIES rel_party,
HZ_RELATIONSHIPS rel,
HZ_CUST_ACCOUNTS role_acct
where acct_role.party_id = rel.party_id
and acct_role.role_type = 'CONTACT'
and rel.party_id = rel_party.party_id
and rel.subject_table_name = 'HZ_PARTIES'
and rel.object_table_name = 'HZ_PARTIES'
and acct_role.cust_account_id = role_acct.cust_account_id
and role_acct.party_id = rel.object_id
and acct_role.cust_account_role_id = l_stud_cont;
select address_id
from ota_customer_contacts_v
where contact_id = P_SOLD_TO_CONTACT_ID
and status = 'A'
and (l_contact_address_id is not null
and l_correspondent = 'C'
and address_id = l_contact_address_id
or not exists (select null
from ota_customer_contacts_v cus
where cus.contact_id = P_SOLD_TO_CONTACT_ID
and cus.address_id =l_contact_address_id)
or l_contact_address_id is null
or l_correspondent <> 'C' );
select address_id
from ota_customer_contacts_v
where contact_id = P_SHIP_TO_CONTACT_ID
and status = 'A'
and (l_contact_address_id is not null
and l_correspondent = 'S'
and address_id = l_contact_address_id
or not exists (select null
from ota_customer_contacts_v cus
where cus.contact_id = P_SHIP_TO_CONTACT_ID
and cus.address_id = l_contact_address_id)
or l_contact_address_id is null
or l_correspondent <> 'S' );
select adr.address_id
from (select LOC.address1 ADDRESS1,LOC.address2 ADDRESS2,LOC.address3 ADDRESS3,LOC.address4 ADDRESS4,
LOC.city CITY,LOC.state STATE,LOC.province PROVINCE,LOC.county COUNTY,LOC.postal_code POSTAL_CODE,
LOC.country COUNTRY,ACCT_SITE.cust_acct_site_id ADDRESS_ID,ACCT_SITE.status STATUS,
ACCT_SITE.cust_account_id CUSTOMER_ID
from HZ_LOCATIONS loc,HZ_CUST_ACCT_SITES acct_site,HZ_PARTY_SITES party_site
where PARTY_SITE.location_id = LOC.location_id
and ACCT_SITE.party_site_id = PARTY_SITE.party_site_id)adr
where adr.status = 'A' and
adr.customer_id=P_SOLD_TO_ORG_ID and
(adr.address_id = decode(l_correspondent, 'S',
l_control_student_address_id, 'C',l_control_contact_address_id) or
decode(l_correspondent,'S',l_control_student_address_id,'C',l_control_contact_address_id) is null )
order by address1,address2,address3,address4,city,state,province,county,postal_code,country;
select adr.address_id
from (select LOC.address1 ADDRESS1,LOC.address2 ADDRESS2,LOC.address3 ADDRESS3,LOC.address4 ADDRESS4,
LOC.city CITY,LOC.state STATE,LOC.province PROVINCE,LOC.county COUNTY,LOC.postal_code POSTAL_CODE,
LOC.country COUNTRY,ACCT_SITE.cust_acct_site_id ADDRESS_ID,ACCT_SITE.status STATUS,
ACCT_SITE.cust_account_id CUSTOMER_ID
from HZ_LOCATIONS loc,HZ_CUST_ACCT_SITES acct_site,HZ_PARTY_SITES party_site
where PARTY_SITE.location_id = LOC.location_id
and ACCT_SITE.party_site_id = PARTY_SITE.party_site_id)adr
where adr.status = 'A' and
adr.customer_id = L_SHIP_TO_ORG_ID and
( adr.address_id = decode(l_correspondent, 'S',
l_control_student_address_id, 'C',l_control_contact_address_id) or
decode(l_correspondent,'S',l_control_student_address_id,'C',l_control_contact_address_id) is null )
order by address1,address2,address3,address4,city,state,province,county,postal_code,country;
Select event_status
from
OTA_EVENTS
WHERE
EVENT_ID = p_event_id;
select address_id
from ota_customer_contacts_v
where contact_id = P_SOLD_TO_CONTACT_ID
and status = 'A';
select adr.address_id
from (select LOC.address1 ADDRESS1,LOC.address2 ADDRESS2,LOC.address3 ADDRESS3,LOC.address4 ADDRESS4,
LOC.city CITY,LOC.state STATE,LOC.province PROVINCE,LOC.county COUNTY,LOC.postal_code POSTAL_CODE,
LOC.country COUNTRY,ACCT_SITE.cust_acct_site_id ADDRESS_ID,ACCT_SITE.status STATUS,
ACCT_SITE.cust_account_id CUSTOMER_ID
from HZ_LOCATIONS loc,HZ_CUST_ACCT_SITES acct_site,HZ_PARTY_SITES party_site
where PARTY_SITE.location_id = LOC.location_id
and ACCT_SITE.party_site_id = PARTY_SITE.party_site_id)adr
where adr.status = 'A' and
adr.customer_id = P_SOLD_TO_ORG_ID and
( adr.address_id = decode(l_control_third_address_id, null, null, l_control_third_address_id))
order by address1,address2,address3,address4,city,state,province,county,postal_code,country;
select customer_id
from (select LOC.address1 ADDRESS1,LOC.address2 ADDRESS2,LOC.address3 ADDRESS3,LOC.address4 ADDRESS4,
LOC.city CITY,LOC.state STATE,LOC.province PROVINCE,LOC.county COUNTY,LOC.postal_code POSTAL_CODE,
LOC.country COUNTRY,ACCT_SITE.cust_acct_site_id ADDRESS_ID,
ACCT_SITE.status STATUS,ACCT_SITE.cust_account_id CUSTOMER_ID
from HZ_LOCATIONS loc,HZ_CUST_ACCT_SITES acct_site,HZ_PARTY_SITES party_site
where PARTY_SITE.location_id = LOC.location_id
and ACCT_SITE.party_site_id = PARTY_SITE.party_site_id)rad,
(Select cust_acct_site_id address_id,site_use_id,status
From hz_cust_site_uses)rsu
where rad.address_id = rsu.address_id and
rsu.site_use_id = p_ship_to_org_id;