Commit 1ebaca77 authored by Lars Arnskov Olsen's avatar Lars Arnskov Olsen
Browse files

Update 12-anlaeg-med-ugyldige-koordinater.sql - user added

parent aeacd75a
......@@ -20,11 +20,13 @@ SELECT
WHEN p.XUTM32EUREF89 BETWEEN 10000 AND 100000 THEN 'X-koordinat indtastet faktor 10 for lavt?'
WHEN p.YUTM32EUREF89 BETWEEN 100000 AND 1000000 THEN 'Y-koordinat indtastet faktor 10 for lavt?'
END AS forslag,
CASE WHEN p.xutm32euref89+p.yutm32euref89>0 THEN 'POINT ('||TRIM(TO_CHAR(ROUND(p.xutm32euref89),'999999999990'))||' '||TRIM(TO_CHAR(ROUND(p.yutm32euref89),'999999999990'))||')' END AS wkt
CASE WHEN p.xutm32euref89+p.yutm32euref89>0 THEN 'POINT ('||TRIM(TO_CHAR(ROUND(p.xutm32euref89),'999999999990'))||' '||TRIM(TO_CHAR(ROUND(p.yutm32euref89),'999999999990'))||')' END AS wkt,
NVL(MAX(REPLACE(p.updateuser,'DATAVASK',NULL)),MAX(REPLACE(p.insertuser,'DATAVASK',NULL))) AS eksempel_bruger
FROM drwplant p
LEFT JOIN code_808 kl /* Kommune https://data.geus.dk/tabellerkoder/koder.html?codetype=808 */
ON p.municipalityno2007 = kl.code
WHERE (p.xutm32euref89 NOT BETWEEN 43700 AND 922500
OR p.yutm32euref89 NOT BETWEEN 6040000 AND 6415600)
AND p.MUNICIPALITYNO2007 < 900
GROUP BY p.plantname, kl.longtext,p.plantid,p.xutm32euref89,p.yutm32euref89,p.participantvatno,p.xutm32euref89,p.insertuser
ORDER BY kl.longtext, p.plantid DESC
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment