How to find Contacts for a customer
SELECT COUNT(*)
FROM HZ_RELATIONSHIPS, HZ_CUST_ACCOUNTS
HZ_RELATIONSHIPS.OBJECT_ID = HZ_cUST_ACCOUNTS.PARTY_ID
AND HZ_RELATIONSHIPS.OBJECT_TYPE = 'ORGANIZATION'
AND HZ_RELATIONSHIPS.RELATIONSHIP_CODE = 'CONTACT_OF'
No comments:
Post a Comment