Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')
In recent QGIS versions (>= 2.6), + works for string concatenation
tostring(hectares) + ' ha'
Previously, the only concatenation operator was: ||
tostring(hectares) || ' ha'
Right-Click on the layer -> Properties -> Labels Then you can use the following function "concat(string1, string2,... ) :
I hope it will be usefull.
You can also append text or put spaces between using alternate quotations:
"Streetnum" || ' ' || "Streetname"
You can use tostring() to concat number fields Ex hectares || ' ha' || tostring(id)
Yes! Using the field calculator, the syntax is: FIELDNAME || FIELDNAME
EDIT: This works on string fields or string-integer combinations. With Integers, it will just perform the math and add the fields together.