query to get customer ,Receipt Method and bank details.
Hi All,
I have below query to get customer ,Receipt Method and bank details.
But it is taking 45 minutes to fetch 13 records.
Could you please help me on this?
SELECT cust.party_name customer_Party_name
,ca.account_number
,ca.attribute1
, (SELECT address1 || ' ' || loc.city || ' ' || loc.state || '-' || loc.postal_code
FROM apps.hz_locations loc
, apps.hz_party_sites hps
WHERE loc.location_id = hps.location_id
AND hps.party_site_id = cas.party_site_id
AND hps.END_DATE_ACTIVE is null
AND loc.Country = 'GB'
) addr
,RM.NAME Receipt_Method_NAME
,Cust_Rec_M.Primary_Flag Receipt_Method_Primary