I do not understand what language I have to use in field-calculator and labels on QGIS:

SQL or Python?

And where I can find the possible script/expressions to use?

in the image you can see the options for expressions in QGIS 1.8 italian version


Expressions in Italian version

  • 2
    What are you trying to do with the field calculator? That will help steer you to appropriate sample scripts. – user3461 Oct 11 '13 at 11:29
  • How can I find other expression like this one discovered here " CASE WHEN ( "field1" > 0) THEN ( "field2" ) END "? – Ale Oct 11 '13 at 12:55

QGIS doesn't use SQL or Python (..yet) for it's field calculator. It uses it's own simple expression language. It is modeled off a SQL-like style but is not really any SQL dialect in particular.

All the functions can be found in the expression builder itself:

enter image description here

  • Expression like "CASE WHEN () THEN () END" – Ale Oct 11 '13 at 12:58
  • 1
    In the Conditional group. – Nathan W Oct 11 '13 at 21:50
  • Added the picture with expressions in italian version: I cannot find "conditionals" group. Also english manual v1.8 do not show "conditionals" group – Ale Oct 14 '13 at 8:33
  • Ahh its not in the 1.8 tree. It will still in 1.8 I think. Your case expression was right it should work. – Nathan W Oct 14 '13 at 10:57
  • 1
    That is about the only hidden feature in 1.8 expression builder. Everything is covered correctly in 2.0 UI. – Nathan W Oct 14 '13 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.