Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add query for annotationType term list options

...

  • some annotationType field values set by query above
  • TODO: update controlled list options for annotationType field, using this SQL query:
    Code Block
    sql
    sql
    
    SELECT 'TMS edition field' annotationType
    UNION
    SELECT 'TMS curatorial remarks' annotationType
    UNION 
    SELECT 'Component prep comments' annotationType
    UNION
    SELECT DISTINCT
     substring(t.userFieldType, 1, charindex(' ', t.userFieldType) - 1) + lower(substring(t.userFieldType, charindex(' ', t.userFieldType), len(t.userFieldType))) annotationType
    FROM
     ObjUserFields u
     JOIN UserFieldTypes t ON u.fieldTypeID = t.userFieldTypeID
    WHERE
     u.FieldTypeID != 17
    UNION
    SELECT DISTINCT
     substring(REPLACE(tt.TextType, 'Coin: ', ''), 1, charindex(' ', REPLACE(tt.TextType + ' ', 'Coin: ', '')) - 1) + lower(substring(REPLACE(tt.TextType, 'Coin: ', ''), charindex(' ', REPLACE(tt.TextType + ' ', 'Coin: ' , '')), len(tt.TextType))) annotationType
    FROM
     TextTypes tt
    WHERE
     tt.TextTypeID IN (2, 11, 13, 16, 17, 18, 21, 24, 25, 26, 28, 29, 30, 36, 44, 51, 55, 64, 66, 67, 68, 71, 72, 74, 80, 83, 88, 94, 95, 98, 105, 107, 109, 118, 120, 122)
    ORDER BY annotationType
    ;