Below is the SQL used to get Customer Contact Information
person_last_name,
person_first_name,
party_number,
party_name,
status,
email_address
FROM fusion.hz_parties
WHERE Upper (party_name)LIKE Upper('%&PARTY_NAME%')
AND party_type = 'PERSON'
SELECT hzporg.party_number,
hzporg.party_name,
hzporg.party_type,
hZp.person_last_name,
hZp.person_first_name,
hZp.party_number,
hZp.party_name,
hZp.status,
hZp.email_address
FROM fusion.hz_relationships HZR,
fusion.hz_parties hzp,
fusion.hz_parties hzpORG
WHERE HZR.object_id = hzp.party_id
AND Upper (hzp.party_name) LIKE Upper('%&PARTY_NAME%')
AND hzp.party_type = 'PERSON'
AND hzr.relationship_code = 'CONTACT'
AND hzr.subject_id = hzporg.party_id
ORDER BY hzporg.party_name,
hZp.person_last_name,
hZp.person_first_name
SELECT hzo.contact_number,
hzporg.party_number,
hzporg.party_name,
hzporg.party_type,
hzr.subject_id,
hzo.org_contact_id,
hZp.person_last_name,
hZp.person_first_name,
hZp.party_number,
hZp.party_name,
hZp.status,
hZp.email_address,
hzp.party_id
FROM fusion.hz_relationships HZR,
fusion.hz_parties hzp,
fusion.hz_org_contacts hzo,
fusion.hz_parties hzpORG
WHERE HZR.object_id = hzp.party_id
AND Upper (hzp.party_name)LIKE Upper('%&PARTY_NAME%')
AND hzp.party_type = 'PERSON'
AND hzr.relationship_code = 'CONTACT'
AND hzr.subject_id = hzporg.party_id
AND hzo.party_relationship_id = HZR.relationship_id
ORDER BY hzporg.party_name,
hZp.person_last_name,
hZp.person_first_name
No comments:
Post a Comment