On Fri, Jan 6, 2012 at 1:25 PM, Martin Dobias <[email protected]> wrote:
> SQL recognizes CASE statement with following alternate syntax:
>
> 1. "if" equivalent:
> CASE
>  WHEN x > 10 THEN 'big' ELSE 'small'
> END

Just pushed a commit implementing that.

The syntax is:
CASE WHEN cond1 THEN exp1 [WHEN cond2 THEN exp2]* [ELSE exp3] END

There may be one or more WHEN/THEN clauses. If no condition matches,
the expression from "ELSE" is evaluated - if none is specified then
NULL is returned.

Note: the other syntax with "base" expression (CASE x WHEN y THEN z
... END) is not supported yet.

Have fun!
Martin
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to