SELECT party.party_type,party.party_name Contact_Name,
SUBSTRB(PARTY.PERSON_FIRST_NAME,1,40) FIRST_NAME ,
SUBSTRB(PARTY.PERSON_LAST_NAME,1,50) LAST_NAME ,
PARTY.CUSTOMER_KEY CONTACT_KEY ,
-- PARTY.PARTY_ID ,
FROM HZ_CONTACT_POINTS CONT_POINT,
HZ_ORG_CONTACTS ORG_CONT ,
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_PARTY.PARTY_ID = REL.PARTY_ID
AND CONT_POINT.OWNER_TABLE_ID(+) = REL_PARTY.PARTY_ID
AND CONT_POINT.PRIMARY_FLAG = 'Y'
AND ACCT_ROLE.CUST_ACCOUNT_ID = ROLE_ACCT.CUST_ACCOUNT_ID
AND ROLE_ACCT.PARTY_ID = REL.OBJECT_ID
AND CONT_POINT.OWNER_TABLE_NAME(+) = 'HZ_PARTIES'
and ROLE_ACCT.cust_account_id = &Enter_Account_id
and rel.object_id = &Enter_Party_id
AND rel.subject_table_name ='HZ_PARTIES'
AND rel.object_table_name ='HZ_PARTIES'
and party.status ='A'
and rel_party.status ='A'
and rel.status ='A'
Thanks a lot for this query..ReplyDelete
Thanks a lot for this query.ReplyDelete
Any time udhay. Thanks for good words about the post.ReplyDelete
hi. . thanks for help. . but for particulat party id. . if we print party.orig_system_ref. . its giving two different values which are not related to that party_id??ReplyDelete
can u help me in this..
ORIG_SYSTEM_REFERENCE refer the value from the Third Party/Legacy System .ReplyDelete
Thanks a lot for this query. it help me in R12ReplyDelete
You are very welcomeReplyDelete
Thank you for this query.ReplyDelete
its nice to see this query, when am in need, Thanks a lot for this useful query, looking forward for more help.ReplyDelete
Thanks a lot for your query..ReplyDelete