Skip to content

Commit

Permalink
comment addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
lbownik authored and lbownik committed Dec 10, 2024
1 parent a053751 commit f8033f5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions scripts/database/delete_unfixable_orcids.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ DO $$
DECLARE
ids numeric[];
BEGIN
-- find indetifiers of all dataset fields with supposed ORCID values
-- that don't match ORCIS format
-- find indetifiers of all dataset fields with supposed ORCID values
-- that don't match ORCIS format
SELECT ARRAY(select id
from datasetfield
where
Expand All @@ -21,10 +21,9 @@ BEGIN
id in (select datasetfield_id
from datasetfield_controlledvocabularyvalue
where
controlledvocabularyvalues_id in (select id
from controlledvocabularyvalue
where
strvalue = 'ORCID')))
controlledvocabularyvalues_id in (select controlledvocabularyvalue.id
from controlledvocabularyvalue join datasetfieldtype ON controlledvocabularyvalue.datasetfieldtype_id = datasetfieldtype.id
where controlledvocabularyvalue.strvalue = 'ORCID' and datasetfieldtype.name = 'authorIdentifierScheme')))
and fieldvalue !~ '^(\d{4}-){3}\d{3}[\dX]$'
and fieldvalue is not null)
INTO ids;
Expand All @@ -50,4 +49,4 @@ BEGIN
from datasetfieldtype
where
name = 'authorIdentifierScheme'));
END $$;
END $$;;

0 comments on commit f8033f5

Please sign in to comment.