[Qgis-user] Concatenate address fields with NULLS

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Mon Sep 21 04:11:57 PDT 2015


Am 21.09.2015, 08:39 Uhr, schrieb Andreas Neumann <a.neumann at carto.net>:

> ... if you use capital letters in field names (which is discourage  
> anyway).
Hi Andreas,
could you elaborate a little on why not to use capital letters for field  
names? Recently I started using capital letters for fields, cause for me,  
any expressions and codes becomes much better readable.
(Which also reminds me, that a lot of processing functions change field  
names to upper case or lower case or leave them as is, totally  
unconsistenly.)

Cheers
Bernd

>
>
>
> On 20.09.2015 12:59, Matthias Kuhn wrote:
>> Hi Phil,
>>
>> In addition to COALESCE I'd like to promote the use of the function  
>> CONCAT() which treats NULL values as empty strings >>(it was changed  
>> recently, it's probably since 2.10) what makes it very handy.
>>
>> Example:
>>
>> NULL || "hello" -> NULL
>>
>> vs.
>>
>> CONCAT( NULL , "hello") -> "hello
>>
>> vs.
>>
>> COALESCE( NULL, "" ) || "hello" -> "hello"
>>
>> Cheers,
>> Matthias
>>
>> On 09/20/2015 09:54 AM, Phil (The Geek) Wyatt wrote:
>>>
>>> Hi Folks,
>>>
>>>
>>> I am working with LIST Address Points data from  
>>> http://listdata.thelist.tas.gov.au/>>>opendata/ (Specifically Clarence  
>>> Municipality) and I need to concatenate into one >>>field the full  
>>> address of each location. I am struggling to figure out how to do it  
>>> >>>when there are fields for unit numbers, building names, numbers to  
>>> and from etc. >>>Many of the fields are also NULL so clearly I want  
>>> those fields disregarded.
>>>
>>>
>>> Can someone give me a quick heads up on how to NOT add the data from a  
>>> field that >>>has NULL?
>>>
>>>
>>> Chances are I will be doing this regularly so I am keen to document  
>>> the required >>>expressions for others to use as well.
>>>
>>>
>>>
>>> Cheers - Phil
>>>
>>>
>>> Volunteer Mapper - Red Cross
>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150921/6faa0a45/attachment.html>


More information about the Qgis-user mailing list