Customer Query
Customer Query
-- hz_parties hp2
WHERE hzp.party_id = hca.party_id
AND hzp.party_id = hzs.party_id
AND hzs.party_id = hca.party_id
AND hcas.party_site_id = hzs.party_site_id
AND hcas.cust_account_id = hca.cust_account_id
AND hps1.party_site_id = hzs.party_site_id
AND hcsu.cust_acct_site_id = hcas.cust_acct_site_id
AND hcar.cust_acct_site_id = hcas.cust_acct_site_id
AND hcar.relationship_id = hr.relationship_id
--AND hzp.PREFERRED_CONTACT_PERSON_ID(+) = hp2.party_id
--AND CONTACT_POINT_PURPOSE = 'BUSINESS'
--AND hca.account_number='MH100055'
AND hzp.party_id = hr.subject_id
AND hr.object_id = hzp1.party_id
AND hcp.owner_table_id (+)= hzp1.party_id
AND hr.relationship_id = hcp.relationship_id(+)
and hcp.contact_point_type(+) ='EMAIL'
and hcp.STATUS(+)='A'
AND hcp_phone.owner_table_id (+)= hzp1.party_id
AND hr.relationship_id = hcp_phone.relationship_id(+)
and hcp_phone.contact_point_type(+) ='PHONE'
and hcp_phone.STATUS(+)='A'
and busineesunit.set_id=hcas.set_id
AND hzs.location_id = a5.location_id
AND cp.profile_class_id = cpc.profile_class_id (+)
AND hca.cust_account_id = cp.cust_account_id
AND cp.collector_id = col.collector_id
AND cp.standard_terms = term.term_id (+)
AND cp.statement_cycle_id = cyc.statement_cycle_id (+)
AND cp.site_use_id IS NULL
and hzp.created_by =nvl(:p_created_by, hzp.created_by)
and busineesunit.bu_name =nvl(:p_Business_Unit,busineesunit.bu_name)
--PH.SITE.57AND NVL(hcp.PRIMARY_FLAG,'Y')='Y'
--and hca.account_number = 'PH.ACCOUNT-10'
--and hzp.party_name ='ELI LILLY (PHILIPPINES) Inc..PHLAT'