[Qgis-user] Case
Fernando M. Roxo da Motta
petro at roxo.org
Fri Aug 24 10:14:45 PDT 2018
Em qui, 2018-08-23 às 20:55 -0300, Renato Saboya escreveu:
> Eddison, try this:
>
> CASE
> WHEN ( "W_BRILLO" = 3 AND "W_PPT" =1 AND "W_TEMP"=2) THEN 2
> WHEN ("W_BRILLO" = 2 AND "W_PPT" =2 AND "W_TEMP"=3) THEN 2
> WHEN ("W_BRILLO" = 1 AND "W_PPT" =2 AND "W_TEMP"=3) THEN 3
> ELSE 5
> END
>
> Note, however, that you don't have any of these combinations in your
> table, so you will get only null values. I put the "ELSE 5" there just
> so you know the code is working.
>
> Also, bear in mind that the lines inside CASE and END must be indented
> by two spaces.
Sure about this?
I have used this kind of structure for layer labelling and most of the time I have indented just for readability purpose. In 2.1? I have done ir withou an specific indentation and it worked quite well.
Slds
Roxo
--
---------------- Non luctari, ludare -------------------+ WYSIWYG
Fernando M. Roxo da Motta <petro at roxo.org> | Editor?
Except where explicitly stated I speak on my own behalf.| VI !!
PU5RXO | I see text,
------------ Quis custodiet ipsos custodes?-------------+ I get text!
More information about the Qgis-user
mailing list