CREATE VIEW VU_FullName AS SELECT NameID,
        /* Generate "composite name" from Surname, Given and Familiar */
        CASE
          WHEN DisplayAs = 'Surname, Given' THEN Surname || ', ' || 
             (CASE
                WHEN Familiar <> '' THEN Given || ' (' || Familiar || ')'
                ELSE Given
              END)
          WHEN DisplayAs = 'Surname Given'  THEN Surname || ' '  ||
             (CASE
                WHEN Familiar <> '' THEN Given || ' (' || Familiar || ')'
                ELSE Given
              END)
          WHEN DisplayAs = 'Given, Surname' THEN 
             (CASE
                WHEN Familiar <> '' THEN Given || ' (' || Familiar || ')'
                ELSE Given
              END)   || ', ' || Surname
          WHEN DisplayAs = 'Given Surname'  THEN 
             (CASE
                WHEN Familiar <> '' THEN Given || ' (' || Familiar || ')'
                ELSE Given
              END)   || ' '  || Surname
        END
      
      /* Concatenate Title and/or Suffix to composite name */
      ||
        CASE
          WHEN Title <> '' AND Suffix <> '' THEN ' [' || Title  || ' / ' || Suffix || ']'
          WHEN Title <> '' AND Suffix =  '' THEN ' [' || Title  || ']'
          WHEN Title =  '' AND Suffix <> '' THEN ' [' || Suffix || ']'
          ELSE ''
        END AS FullName,

      PersonID

FROM Name;