[Qgis-user] Concatenate address fields with NULLS

kimaidou kimaidou at gmail.com
Sun Sep 20 03:44:10 PDT 2015


Hi,

You can use the function "Colaesce", which returns the first not null value
of a series.

For example, Coalesce( foo, bar, 3) will return
* 3 if foo and bar are NULL
* bar if foo is NULL and bar is not NULL
* foo if foor is NOT NULL

You can use this function with second argument as an empty string ( 2
consecutive single quotes, like '' ) like this

Coalesce( something, '') || Coalesce( otherfield, '') || Coalesce(
thirdfield, '')

Regards
Michaƫl

2015-09-20 9:54 GMT+02:00 Phil (The Geek) Wyatt <phil at wyatt-family.com>:

> 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
> <http://www.redcross.org.au/volunteering.aspx>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150920/6451a52c/attachment.html>


More information about the Qgis-user mailing list