added a coalesce in sql query

This commit is contained in:
Michele Artini 2020-05-21 11:08:07 +02:00
parent b3bcbb3129
commit e43d4d7778
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ SELECT
'' AS inferenceprovenance,
d.id AS collectedfromid,
d.officialname AS collectedfromname,
o.country || '@@@' || cntr.name || '@@@dnet:countries@@@dnet:countries' AS country,
o.country || '@@@' || COALESCE(cntr.name,o.country) || '@@@dnet:countries@@@dnet:countries' AS country,
'sysimport:crosswalk:entityregistry@@@sysimport:crosswalk:entityregistry@@@dnet:provenance_actions@@@dnet:provenance_actions' AS provenanceaction,
ARRAY[]::text[] AS pid