I tried the following in the field calculator:
caseWhen I look at the preview, the result is correct whether or not the field contains int or NULL. But when I try to run it, I get an error:
when ("bb_usage" IS NULL) then 0
else to_int("bb_usage"")
end
I also tried
caseand get the same error.
when ("bb_usage" IS NULL) then 0
when ("bb_usage" IS NULL) then to_int("bb_usage")
end
I tried
if ("bb_usage" IS NULL, 0, to_int("bb_usage"))same error.
I know there are workarounds, but why don't any of these work? Why does to_int get evaluated on the NULLs?
_______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
