...
TMS table name | TMS field name | CSpace field name | notes |
---|---|---|---|
Objects | ObjectCount | numberOfObjects |
|
Components | CompCount | numberOfObjects |
|
sql query
view: cs_numberofobjects
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT o.objectID, o.objectCount numberOfObjects FROM Objects o WHERE o.IsVirtual = 0 AND o.IsTemplate = 0 AND o.objectID NOT IN (SELECT t.objectID FROM ObjComponents t GROUP BY t.objectID HAVING count(*) = 1) UNION ALL SELECT o.objectID, (CASE WHEN c.compCount > o.objectCount THEN c.compCount ELSE o.objectCount END) numberOfObjects FROM Objects o JOIN ObjComponents c ON o.objectID = c.objectID WHERE o.IsVirtual = 0 AND o.IsTemplate = 0 AND c.objectID IN (SELECT t.objectID FROM ObjComponents t GROUP BY t.objectID HAVING count(*) = 1) UNION ALL SELECT 'c' + CAST(c.componentID AS VARCHAR) objectID, c.compCount numberOfObjects FROM ObjComponents c WHERE c.objectID IN (SELECT t.objectID FROM ObjComponents t GROUP BY t.objectID HAVING count(*) > 1) ; |
...
TMS table name | TMS field name | CSpace field name | notes |
---|---|---|---|
Objects | description | briefDescription |
|
Components | physDesc | briefDescription |
|
sql query
view: cs_briefdescriptions
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT o.objectID, o.description briefDescription FROM Objects o WHERE o.IsVirtual = 0 AND o.IsTemplate = 0 UNION ALL SELECT 'c' + CAST(c.componentID AS VARCHAR) objectID, c.physDesc briefDescription FROM ObjComponents c WHERE c.objectID IN (SELECT t.objectID FROM ObjComponents t GROUP BY t.objectID HAVING count(*) > 1) AND c.physDesc IS NOT NULL UNION ALL SELECT c.objectID, c.physDesc briefDescription FROM ObjComponents c WHERE c.objectID IN (SELECT t.objectID FROM ObjComponents t GROUP BY t.objectID HAVING count(*) = 1) AND c.physDesc IS NOT NULL ; |
...
TMS table name | TMS field name | CSpace field name | notes |
---|---|---|---|
ObjUserFields | FieldValue | pahmaEthnographicFileCode |
|
sql query
view: cs_ethnographicfilecodes
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT u.objectID, u.fieldValue pahmaEthnographicFileCode FROM ObjUserFields u WHERE u.FieldTypeID = 17 ; |
...