Customer Profile Update Issue – Query to fetch Customers with No TAX Profile

When the tax profile is missing for a customer, we cannot edit the customer profile details from the Customer dashboard. So to identify such customers where we may face the issue to update profile we can use the below query.

SELECT
distinct
hp.party_id,
hp.party_number,
hp.party_name,
hp.party_type,
hp.creation_date,
hcs.cust_account_id,
hcs.account_number,
hc.org_id,
hcs.attribute1,
hcs.attribute3
FROM
apps.hz_parties hp,
APPS.hz_cust_accounts_all hcs,

apps.hz_cust_acct_sites_all hc,
apps.hz_party_sites hps,
apps.hz_cust_site_uses_all hcsu
WHERE
1=1
AND hps.party_site_id = hc.party_site_id
AND hcsu.cust_acct_site_id = hc.cust_acct_site_id
AND hp.party_id=hps.party_id
AND hcs.cust_account_id=hc.cust_account_id
AND hcs.status=’A’
AND hp.party_id=hcs.party_id
AND hp.party_id NOT IN (
SELECT
party_id
FROM
apps.zx_party_tax_profile
WHERE
party_type_code IN (
‘THIRD_PARTY’,
‘FIRST_PARTY’,
‘LEGAL_ESTABLISHMENT’
)
)

Recent Posts