Вы можете использовать приведенный ниже запрос, чтобы получить контактную информацию для Клиента на уровнях Стороны и Участника.
SELECT DISTINCT hp.party_id,
hp.party_name,
hca.cust_account_id,
hca.account_number,
party_site_id,
party_site_number,
hcp.phone_number,
NVL (hcp.email_address, hcp.url) email_or_url,
hcp.contact_point_type communication_type,
hcp.status active,
hcp.contact_point_purpose purpose
FROM apps.hz_contact_points hcp,
apps.hz_party_sites hps,
apps.hz_cust_accounts hca,
apps.hz_parties hp
WHERE hps.party_id = hca.party_id
AND hp.party_id = hca.party_id
AND hcp.contact_point_type IN ('PHONE','EMAIL')
AND hcp.owner_table_name = 'HZ_PARTIES'
AND hcp.owner_table_id = hps.party_id
AND hcp.status = 'A'
AND hps.status = 'A'
AND hca.status = 'A'
AND hp.status = 'A'
UNION
SELECT DISTINCT hp.party_id,
hp.party_name,
hca.cust_account_id,
hca.account_number,
party_site_id,
party_site_number,
hcp.phone_number,
NVL (hcp.email_address, hcp.url) email_or_url,
hcp.contact_point_type communication_type,
hcp.status active,
hcp.contact_point_purpose purpose
FROM apps.hz_contact_points hcp,
apps.hz_party_sites hps,
apps.hz_cust_accounts hca,
apps.hz_parties hp
WHERE hps.party_id = hca.party_id
AND hp.party_id = hca.party_id
AND hcp.contact_point_type IN ('PHONE','EMAIL')
AND hcp.owner_table_name = 'HZ_PARTY_SITES'
AND hcp.owner_table_id = hps.party_site_id
AND hcp.status = 'A'
AND hps.status = 'A'
AND hp.status = 'A'
AND hca.status = 'A';
Надеюсь, это полезно.