...
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT o.objectID acquisitionID, x.constituentID owner FROM ConXrefs x JOIN roles r ON x.roleID = r.roleID JOIN objects o ON x.ID = o.objectID WHERE x.tableID = 108 AND x.active = 1 AND o.IsVirtual = 1 AND o.IsTemplate = 0 AND o.objectNumber LIKE 'ACC%' AND r.roleID IN (2,62) --lower(r.ROLE) IN ('donor', 'seller') ; |