openmaptiles/layers/place/capital.sql

9 wiersze
238 B
MySQL
Czysty Zwykły widok Historia

2016-12-02 12:30:41 +00:00
CREATE OR REPLACE FUNCTION normalize_capital_level(capital TEXT)
RETURNS INT AS $$
SELECT CASE
WHEN capital IN ('yes', '2') THEN 2
WHEN capital = '4' THEN 4
ELSE NULL
END;
$$ LANGUAGE SQL IMMUTABLE STRICT;