DBA Data[Home] [Help]

VIEW: APPS.WSH_CONTACT_PHONE

Source

View Text - Preformatted

SELECT acct_role.cust_account_role_id contact_id, acct_role.cust_account_id customer_id, acct_role.cust_acct_site_id address_id, substrb ( party.person_last_name,1,50) last_name, substrb ( party.person_first_name,1,40) first_name, org_cont.job_title job_title, wpcp.area_code area_code, wpcp.phone_number phone_number FROM hz_cust_account_roles acct_role, hz_parties party, hz_org_contacts org_cont, hz_relationships rel, hz_cust_accounts role_acct, wsh_primary_contact_phone_v wpcp WHERE acct_role.party_id = rel.party_id AND acct_role.role_type = 'CONTACT' AND org_cont.party_relationship_id = rel.relationship_id AND rel.subject_id = 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 = wpcp.contact_id (+)
View Text - HTML Formatted

SELECT ACCT_ROLE.CUST_ACCOUNT_ROLE_ID CONTACT_ID
, ACCT_ROLE.CUST_ACCOUNT_ID CUSTOMER_ID
, ACCT_ROLE.CUST_ACCT_SITE_ID ADDRESS_ID
, SUBSTRB ( PARTY.PERSON_LAST_NAME
, 1
, 50) LAST_NAME
, SUBSTRB ( PARTY.PERSON_FIRST_NAME
, 1
, 40) FIRST_NAME
, ORG_CONT.JOB_TITLE JOB_TITLE
, WPCP.AREA_CODE AREA_CODE
, WPCP.PHONE_NUMBER PHONE_NUMBER
FROM HZ_CUST_ACCOUNT_ROLES ACCT_ROLE
, HZ_PARTIES PARTY
, HZ_ORG_CONTACTS ORG_CONT
, HZ_RELATIONSHIPS REL
, HZ_CUST_ACCOUNTS ROLE_ACCT
, WSH_PRIMARY_CONTACT_PHONE_V WPCP
WHERE ACCT_ROLE.PARTY_ID = REL.PARTY_ID
AND ACCT_ROLE.ROLE_TYPE = 'CONTACT'
AND ORG_CONT.PARTY_RELATIONSHIP_ID = REL.RELATIONSHIP_ID
AND REL.SUBJECT_ID = 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 = WPCP.CONTACT_ID (+)