[Qgis-user] Case

Eddison Araya eddisonjose at gmail.com
Fri Aug 24 12:06:57 PDT 2018


[image: image.png]

Hello, sure, I ran it and it worked.

Attached image

regards

Eddison

El vie., 24 ago. 2018 a las 11:14, Fernando M. Roxo da Motta (<
petro at roxo.org>) escribió:

> 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!
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180824/2655dcbd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11584 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180824/2655dcbd/attachment.png>


More information about the Qgis-user mailing list