Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add acquisition owners extract

...

  • the join structure of this query mirrors the structure of the Accessions-Objects Relationships query above

Acquisition Owners extact

field mapping

TMS table name

TMS field name

CSpace field name

notes

ConXrefs

ObjectID

reference to Accession

 

ConXrefs

ConstituentID

owner

 

sql query

view:

Code Block
sql
sql

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)  --r.ROLE IN ('donor', 'seller')
;

notes