SQL script for the update of "reference" property of Grant, Funder and Project. (Issue #187)
This commit is contained in:
parent
bb76a0527e
commit
59cb4db641
|
@ -0,0 +1,26 @@
|
|||
-- Grant
|
||||
UPDATE public."Grant"
|
||||
SET "Reference" = CONCAT('cristin:', "Reference")
|
||||
WHERE "Reference" LIKE '%cristin/%';
|
||||
UPDATE public."Grant"
|
||||
SET "Reference" = CONCAT('OpenAIRE:', "Reference")
|
||||
where "Reference" like '%_________::%' and
|
||||
"Reference" not like 'OpenAIRE:%';
|
||||
|
||||
-- Funder
|
||||
UPDATE public."Funder"
|
||||
SET "Reference" = CONCAT('cristin:', "Reference")
|
||||
WHERE "Reference" LIKE '%cristin/%';
|
||||
UPDATE public."Funder"
|
||||
SET "Reference" = CONCAT('openaire:', "Reference")
|
||||
WHERE "Reference" LIKE '%_________::%' and
|
||||
upper("Reference") NOT LIKE upper('openAIRE:%');
|
||||
|
||||
-- Project
|
||||
UPDATE public."Project"
|
||||
SET "Reference" = CONCAT('cristin:', "Reference")
|
||||
WHERE "Reference" LIKE '%cristin/%';
|
||||
UPDATE public."Project"
|
||||
SET "Reference" = CONCAT('openaire:', "Reference")
|
||||
WHERE "Reference" LIKE '%_________::%' and
|
||||
upper("Reference") NOT LIKE upper('openAIRE:%');
|
Loading…
Reference in New Issue