The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT subject_id FROM hz_relationships
WHERE relationship_id = id_in
AND subject_type = 'PERSON';
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_org_party_id
AND location_id = x_location_id;
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_per_party_id
AND location_id = x_location_id;
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_party_rel_party_id
AND location_id = x_location_id;
SELECT 'Y' FROM hz_contact_points
WHERE contact_point_type = 'PHONE'
AND phone_line_type = 'GEN'
AND owner_table_name = 'HZ_PARTIES'
AND owner_table_id = party_id_in
AND phone_number = phone_number
AND NVL(phone_country_code,'x') = NVL(country_code,'x')
AND NVL(phone_area_code,'x') = NVL(area_code,'x')
AND NVL(phone_extension,'x') = NVL(extension,'x');
SELECT owner_table_id
FROM hz_contact_points
WHERE contact_point_type = 'EMAIL'
AND owner_table_name = 'HZ_PARTIES'
AND upper(email_address) = upper(email_address_in);
select 'Y' from hz_parties
where customer_key = l_party_key
and party_type = 'PERSON'
and party_id = id_in;
SELECT party_id FROM hz_relationships
WHERE object_id = x_org_party_id
AND subject_id = x_per_party_id
AND relationship_code = 'CONTACT_OF';
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_org_party_id
AND location_id = x_location_id;
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_per_party_id
AND location_id = x_location_id;
SELECT party_site_id FROM hz_party_sites
WHERE party_id = x_party_rel_party_id
AND location_id = x_location_id;
SELECT 'Y' FROM hz_contact_points
WHERE contact_point_type = 'PHONE'
AND phone_line_type = 'GEN'
AND owner_table_name = 'HZ_PARTIES'
AND owner_table_id = x_hz_party_id
AND phone_number = x_phone_number
AND NVL(phone_country_code,'x') = NVL(x_phone_country_code,'x')
AND NVL(phone_area_code,'x') = NVL(x_phone_area_code,'x')
AND NVL(phone_extension,'x') = NVL(x_phone_extention,'x');
SELECT 'Y' FROM hz_contact_points
WHERE contact_point_type = 'EMAIL'
AND owner_table_name = 'HZ_PARTIES'
AND owner_table_id = x_hz_party_id
AND email_address = x_email_address;
select hz_party_number_s.nextval into x_party_number from dual;
select hz_parties_s.nextval into x_org_party_id from dual;
select hz_party_number_s.nextval into x_party_number from dual;
select hz_parties_s.nextval into x_per_party_id from dual;
Select hz_org_contacts_s.nextval into x_org_contact_id from dual;
select hz_party_number_s.nextval into x_party_number from dual;
select hz_contact_numbers_s.nextval into x_contact_number from dual;
select hr_locations_s.nextval into x_location_id from dual;
select hz_party_sites_s.nextval into x_party_site_id from dual;
select hz_party_site_number_s.nextval into x_party_site_number from dual;
select hz_party_site_uses_s.nextval into x_party_site_use_id from dual;
select hz_party_sites_s.nextval into x_party_site_id from dual;
select hz_party_site_number_s.nextval into x_party_site_number from dual;
select hz_party_site_uses_s.nextval into x_party_site_use_id from dual;
SELECT hz_contact_points_s.nextval into x_contact_point_id from dual;
SELECT hz_contact_points_s.nextval into x_contact_point_id from dual;
select hz_party_number_s.nextval into x_party_number from dual;
select hz_parties_s.nextval into x_per_party_id from dual;
select hr_locations_s.nextval into x_location_id from dual;
select hz_party_sites_s.nextval into x_party_site_id from dual;
select hz_party_site_number_s.nextval into x_party_site_number from dual;
select hz_party_site_uses_s.nextval into x_party_site_use_id from dual;
SELECT hz_contact_points_s.nextval into x_contact_point_id from dual;
SELECT hz_contact_points_s.nextval into x_contact_point_id from dual;
select max(p.party_id)
from hz_contact_points cp,
hz_parties p
where p.customer_key = l_party_key
and p.party_type = 'PERSON'
and cp.owner_table_id = p.party_id
and cp.owner_table_name = 'HZ_PARTIES'
and cp.email_address = p_email_address
and cp.primary_flag = 'Y';
select max(p.party_id)
from hz_contact_points cp,
hz_parties p
where p.customer_key = l_party_key
and p.party_type = 'PERSON'
and cp.owner_table_id = p.party_id
and cp.owner_table_name = 'HZ_PARTIES'
and cp.primary_flag = 'Y'
and cp.phone_number = p_ph_number
and nvl(cp.phone_country_code, nvl(p_ph_country_code, 'x')) = nvl(p_ph_country_code, 'x')
and nvl(cp.phone_area_code, nvl(p_ph_area_code, 'x')) = nvl(p_ph_area_code, 'x');
select max(psite.party_id)
from hz_party_sites psite,
hz_locations loc,
hz_parties party
where psite.location_id = loc.location_id
and loc.address1 = p_address1
and loc.country = p_country
and party.customer_key = l_party_key
and psite.party_id = party.party_id;
select 'Y'
from hz_parties
where customer_key = l_party_key
and party_type = 'PERSON';
select max(psite.party_id) from hz_party_sites psite, hz_locations loc,
hz_parties party
where psite.location_id = loc.location_id
and loc.address1 = p_address1
and loc.country = p_country
and party.customer_key = l_party_key
and psite.party_id = party.party_id;
select max(psite.party_id) from hz_party_sites psite, hz_locations loc,
hz_parties party
where psite.location_id = loc.location_id
and loc.country = p_country
and party.customer_key = l_party_key
and psite.party_id = party.party_id;
select 'Y' from hz_parties
where customer_key = l_party_key
and party_type = 'ORGANIZATION';
select 'Y' from hz_parties
where customer_key = l_party_key
and party_type = 'PERSON';
select 'Y' from hz_parties
where customer_key = l_party_key
and party_type = 'PERSON';
select max(per.party_id) from
hz_parties org,
hz_parties per,
hz_relationships rel,
hz_contact_points cpoint
where org.party_id = p_org_party_id
and org.party_type = 'ORGANIZATION'
and rel.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.SUBJECT_TYPE = 'PERSON'
and rel.OBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.RELATIONSHIP_CODE = 'CONTACT_OF'
and rel.OBJECT_ID = org.party_id
and rel.SUBJECT_ID = per.PARTY_ID
and per.customer_key = l_party_key
and cpoint.owner_table_id = rel.party_id
and cpoint.owner_table_name = 'HZ_PARTIES'
and cpoint.contact_point_type = 'EMAIL'
and cpoint.email_address = p_email_address
and cpoint.status = 'A';
select max(per.party_id) from
hz_parties org,
hz_parties per,
hz_relationships rel,
hz_contact_points cpoint,
hz_contact_points cpoint1
where org.party_id = p_org_party_id
and org.party_type = 'ORGANIZATION'
and rel.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.SUBJECT_TYPE = 'PERSON'
and rel.OBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.RELATIONSHIP_CODE = 'CONTACT_OF'
and rel.OBJECT_ID = org.party_id
and rel.SUBJECT_ID = per.PARTY_ID
and per.customer_key = l_party_key
and cpoint.owner_table_id = rel.party_id
and cpoint.owner_table_name = 'HZ_PARTIES'
and cpoint.contact_point_type = 'EMAIL'
and cpoint.email_address = p_email_address
and cpoint.status = 'A'
and cpoint1.owner_table_id = rel.party_id
and cpoint1.owner_table_name = 'HZ_PARTIES'
and cpoint1.contact_point_type = 'PHONE'
and cpoint1.phone_area_code||'-'||cpoint1.phone_number||'-'||cpoint1.phone_extension =
p_phone_area_code||'-'||p_phone_number||'-'||p_phone_extension
and (cpoint1.phone_line_type<>'FAX' or cpoint1.phone_line_type is null)
and cpoint1.status = 'A';
select max(per.party_id) from
hz_parties org,
hz_parties per,
hz_relationships rel,
hz_contact_points cpoint
where org.party_id = p_org_party_id
and org.party_type = 'ORGANIZATION'
and rel.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.SUBJECT_TYPE = 'PERSON'
and rel.OBJECT_TABLE_NAME = 'HZ_PARTIES'
and rel.RELATIONSHIP_CODE = 'CONTACT_OF'
and rel.OBJECT_ID = org.party_id
and rel.SUBJECT_ID = per.PARTY_ID
and per.customer_key = l_party_key
and cpoint.owner_table_id = rel.party_id
and cpoint.owner_table_name = 'HZ_PARTIES'
and cpoint.contact_point_type = 'PHONE'
and cpoint.phone_area_code||'-'||cpoint.phone_number||'-'||cpoint.phone_extension =
p_phone_area_code||'-'||p_phone_number||'-'||p_phone_extension
and (cpoint.phone_line_type<>'FAX' or cpoint.phone_line_type is null)
and cpoint.status = 'A';
select max(loc.location_id)
from hz_party_sites ps, hz_locations loc
where ps.party_id = p_party_id
and ps.location_id = loc.location_id
and loc.address_key = l_address_key
and loc.country = p_country
and nvl(loc.city,p_city) = p_city;
select max(loc.location_id)
from hz_locations loc
where loc.address_key = l_address_key
and loc.country = p_country
and nvl(loc.city,p_city) = p_city;
SELECT object_id, subject_id
FROM hz_relationships
WHERE party_id = p_id
-- dbiswas 10 Jun 2003 fix for bug 2949603
-- AND directional_flag = 'F';
SELECT event_offer_id
FROM ams_event_offers_all_b
WHERE source_code = p_source_code ;
SELECT related_event_id
FROM ams_campaign_schedules_b
WHERE source_code = p_source_code ;