data4impact/apps/data4impact-import-scripts/scripts/swedishProjects/projOtherIds2json.sql

7 lines
296 B
MySQL
Raw Normal View History

2022-02-15 11:17:47 +01:00
COPY (SELECT row_to_json(t) FROM (SELECT
'40|'||rpad(lower(organization_short),12,'_')||'::'||MD5(dnr) AS "projectId",
dnr AS "id",
lower(organization_short)||':grant_id' AS "type"
FROM projects
) t) TO STDOUT;