Revision 62597
Added by Michele Artini almost 2 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/repo-hi/fillhostedBy/fillHostedBy.sql.st | ||
---|---|---|
1 | 1 |
INSERT INTO hostedby_map(_dnet_resource_identifier_, oa_source_id, entry, datasourceid) |
2 | 2 |
SELECT d.issn||'@@'||d.collectedfrom, d.collectedfrom, d.issn, d.id |
3 | 3 |
FROM dsm_services d where |
4 |
d.collectedfrom ='$datasourceId$' and d.issn is not null and d.id like '$datasourceNamespacePrefix$%' |
|
4 |
d.collectedfrom ='$datasourceId$' and d.issn is not null and d.issn != '' and d.id like '$datasourceNamespacePrefix$%'
|
|
5 | 5 |
AND |
6 | 6 |
(d.collectedfrom, d.issn) NOT IN |
7 | 7 |
(SELECT oa_source_id, entry from hostedby_map); |
... | ... | |
10 | 10 |
INSERT INTO hostedby_map(_dnet_resource_identifier_, oa_source_id, entry, datasourceid) |
11 | 11 |
SELECT d.eissn||'@@'||d.collectedfrom, d.collectedfrom, d.eissn, d.id |
12 | 12 |
FROM dsm_services d where |
13 |
d.collectedfrom ='$datasourceId$' and d.eissn is not null and d.id like '$datasourceNamespacePrefix$%' |
|
13 |
d.collectedfrom ='$datasourceId$' and d.eissn is not null and d.eissn != '' and d.id like '$datasourceNamespacePrefix$%'
|
|
14 | 14 |
AND |
15 | 15 |
(d.collectedfrom, d.eissn) NOT IN |
16 | 16 |
(SELECT oa_source_id, entry from hostedby_map); |
... | ... | |
18 | 18 |
|
19 | 19 |
INSERT INTO hostedby_map(_dnet_resource_identifier_, oa_source_id, entry, datasourceid) |
20 | 20 |
SELECT d.lissn||'@@'||d.collectedfrom, d.collectedfrom, d.lissn, d.id |
21 |
FROM dsm_servicess d where
|
|
22 |
d.collectedfrom ='$datasourceId$' and d.lissn is not null and d.id like '$datasourceNamespacePrefix$%' |
|
21 |
FROM dsm_services d where |
|
22 |
d.collectedfrom ='$datasourceId$' and d.lissn is not null and d.lissn != '' and d.id like '$datasourceNamespacePrefix$%'
|
|
23 | 23 |
AND |
24 | 24 |
(d.collectedfrom, d.lissn) NOT IN |
25 | 25 |
(SELECT oa_source_id, entry from hostedby_map); |
Also available in: Unified diff
fixed sql