Identify customer from ar_statement_delivery
Summary:
How to identify the customer from the ar_statement_delivery table
Content (required):
I have written a sql in order to identify the customer_name, account_number, email address and date of statement run for that customer
The query is:
select hp.party_name customer_name,
hca.account_number,
email.email_address,
asd.delivery_method_code,
asd.contact_asd_Email_address,
asd.creation_date
from hz_parties hp,
hz_cust_accounts hca,
hz_cust_acct_sites_all hcasa,
ar_statement_delivery asd,
(select emailpeo.email_address,
RelationshipPEO.OBJECT_ID
from HZ_CONTACT_POINTS emailpeo,
HZ_RELATIONSHIPS RelationshipPEO
where RelationshipPEO.SUBJECT_ID = EmailPEO.OWNER_TABLE_ID(+)