[Qgis-user] CASE Conditional in QGIS 2.0
Larissa Junek
junek at gbd-consult.de
Fri May 24 07:06:31 PDT 2013
Hello,
I'd like to use a CASE Conditional to update a field in OSM road data:
CASE WHEN "type" = 'access_ramp' AND "maxspeed" IS NULL THEN 30 END
This means that the field "maxspeed" shall be 30 for the access_ramp
column.
I inserted the SQL expression above and obvoiusly the CASE WHEN
Conditional uses automatically an ELSE function, even if I don't insert
one! In my case now the maxspeed only for 'access_ramp' is 30 and all
the other features are set to NULL. It seems that the ELSE condition is
set to NULL and that all the other data don't get the already existing
value from the access_ramp column but are overwritten.
I don't want to have the other objects overwritten. Do I always have to
use an ELSE expression? In which case can s.o. use the CASE expression
only? Does somebody use it in practice?
Kind regards,
Larissa
More information about the Qgis-user
mailing list