Help qith SQL to find Inactive location
We have an alert which fires and returns a list of incomplete customer addresses.
The issue is the query is also returning inactive customer adrresses.
What do I need to add to the where clause to exclude the inactive addresses?
Any help would be greatly appreciated. So far my where clause looks like this:
WHERE cust.cust_account_id = acct_site.cust_account_idAND cust.party_id = party.party_idAND acct_site.party_site_id = party_site.party_site_id(+)AND loc.location_id(+) = party_site.location_idAND acct_site.cust_acct_site_id = site_uses.cust_acct_site_id0