query to get get customer details based on location
DESCRIPTION
Query to Get Get Customer Details Based on LocationTRANSCRIPT
-
If we know the location,we get the customer from the below queries.
First get the location_id,Pass this into below query
select * from apps.hz_party_sites where location_id = '5388571' ---Pass Location_id here you get party_site_id .
select * from apps.hz_cust_acct_sites_all where party_site_id = '4387649' --Pass party site id hereYou get cust_account_id
select * from apps.hz_cust_accounts where cust_account_id = '76531'--Pass cust_account_id here,you get the customer number nothing but the Account_number column in this query