Re: [Qgis-user] using nested case statements in labelling

2016-12-22 Thread damos
Sorry that was Regis and Delaz On 22 Dec 2016 17:19, "damien stephens" wrote: > Thanks very much Regis and Relaz. > Much appreciated. > > On 21 Dec 2016 16:08, "Régis Haubourg [via OSGeo.org]" < > ml-node+s1560n5300800...@n6.nabble.com> wrote: > >> Hi, >> you are simply facing the SQL standard b

Re: [Qgis-user] using nested case statements in labelling

2016-12-22 Thread damos
Thanks very much Regis and Relaz. Much appreciated. On 21 Dec 2016 16:08, "Régis Haubourg [via OSGeo.org]" < ml-node+s1560n5300800...@n6.nabble.com> wrote: > Hi, > you are simply facing the SQL standard behavior of the | operator when it > compares something to a NULL value, the whole result will

Re: [Qgis-user] using nested case statements in labelling

2016-12-21 Thread Régis Haubourg
Hi, you are simply facing the SQL standard behavior of the | operator when it compares something to a NULL value, the whole result will be NULL. In SQL, you can avoid that by wrapping each value in a "coalesce(myvalue, '')" that will replace NULL by an empty string. In QGIS, you can also use the "

Re: [Qgis-user] using nested case statements in labelling

2016-12-20 Thread DelazJ
Hi, The issue resides in the use of || operator, which doesn't handle null values: if any of the concatenated items is null then the result returns null. In this case, better use the concat function. Something like below should work (untested, though) Case when "signifcant" = 'yes' Then concat(

[Qgis-user] using nested case statements in labelling

2016-12-20 Thread damos
HI I am trying to do a nested case statement for a labelling task. I have a list of mines of varying sizes with different commodities and would like to label with the name of the mine and the amount of each commodity at the mine in a new line below the name. I only want to label the mines that I ha