Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TMS table name

TMS field name

CSpace field name

notes

ObjDates

DateText

objectProductionDate_dateDisplayDate

 

ObjDates

DateBegSearch

objectProductionDate_dateEarliestSingleYear

 

ObjDates

DateEndSearch

objectProductionDate_dateLatestYear

 

ObjDates

DayBegSearch

objectProductionDate_dateEarliestSingleDay

 

ObjDates

DayEndSearch

objectProductionDate_dateLatestDay

 

ObjDates

MonthBegSearch

objectProductionDate_dateEarliestSingleMonth

 

ObjDates

MonthEndSearch

objectProductionDate_dateLatestMonth

 

ObjDates

Remarks

objectProductionNote

 

sql query

view: cs_productiondates

Code Block
sql
sql
SELECT
 CAST(do.objectID AS VARCHAR) objectID,
 d.dateText objectProductionDate_dateDisplayDate,
 (CASE WHEN d.dateBegSearch != '0' THEN d.dateBegSearch END) objectProductionDate_dateEarliestSingleYear,
 (CASE WHEN d.dateEndSearch != '0' THEN d.dateEndSearch END) objectProductionDate_dateLatestYear,
 d.dayBegSearch objectProductionDate_dateEarliestSingleDay,
 d.dayEndSearch objectProductionDate_dateLatestDay,
 d.monthBegSearch objectProductionDate_dateEarliestSingleMonth,
 d.monthEndSearch objectProductionDate_dateLatestMonth,
FROM
 ObjDates d.remarks
 objectProductionNoteJOIN FROMObjects o ObjDatesON d.objectID = o.objectID
WHERE
 o.IsVirtual = 0 AND o.IsTemplate = 0 
 AND lower(d.eventType) = 'date made'
;

...

Code Block
sql
sql
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 x.constituentID objectProductionOrganization,
 LOWER(r.ROLE) objectProductionOrganizationRole
FROM
 ConXrefs x
 JOIN roles r ON x.roleID = r.roleID
 JOIN objects o ON x.ID = o.objectID
 JOIN constituents c ON x.constituentID = c.constituentID
WHERE
 x.tableID = 108
 AND x.active = 1
 AND o.IsVirtual = 0 AND o.IsTemplate = 0 
 AND c.constituentTypeID > 1
 AND lower(r.ROLE) IN ('accompanist', 'artist', 'designer', 'maker', 'manufacturer', 'narrator', 'painter', 'performer', 'photographer', 'recorder')
;

notes

Production note extract

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjDates

Remarks

objectProductionNote

 

ConXrefs

Remarks

objectProductionNote

 

sql query

view:

Code Block
sql
sql

SELECT
 CAST(d.objectID AS VARCHAR) objectID,
 'Production date: ' + d.remarks objectProductionNote
FROM
 ObjDates d
 JOIN Objects o ON d.objectID = o.objectID
WHERE
 o.IsVirtual = 0 AND o.IsTemplate = 0 
 AND lower(d.eventType) = 'date made'
UNION ALL
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
  'Production person/org: ' + x.remarks objectProductionNote
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 = 0 AND o.IsTemplate = 0 
 AND lower(r.ROLE) IN ('accompanist', 'artist', 'designer', 'maker', 'manufacturer', 'narrator', 'painter', 'performer', 'photographer', 'recorder')
 AND x.remarks IS NOT NULL
 ;

notes

  • NOTE: multiple notes per object should be concatenated into single (non-repeating) field objectProductionNote, separated by line breaks