179: nvl(Role.cust_acct_site_id, 0) CustomerAddrID
180: FROM fnd_user fnd,
181: hz_parties Party,
182: hz_cust_account_roles ROLE,
183: hz_relationships Rel
184: WHERE Party.party_id = fnd.customer_id
185: AND Party.party_type = 'PERSON'
186: AND Role.current_role_state = 'A'
187: AND Role.role_type = 'CONTACT'
408: hz_parties cust_party,
409: hz_cust_account_roles con,
410: hz_parties party,
411: hz_parties rel_party,
412: hz_relationships rel,
413: hz_cust_accounts acct
414: where
415: cst.cust_account_id = con.cust_account_id
416: and con.cust_account_role_id = gContactID