UPDATE osint.document_exhibits AS document
SET title = document.citation_text
WHERE document.capture_kind_id = 'clipping'
  AND BTRIM(document.citation_text) <> ''
  AND (
    BTRIM(document.title) = ''
    OR EXISTS (
      SELECT 1
      FROM osint.assets AS asset
      WHERE asset.id = document.asset_id
        AND document.title = asset.original_name
    )
  );
