Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')

share|improve this question

4 Answers 4

up vote 13 down vote accepted

The concatenation operator is: ||

e.g.

hectares||' ha'
share|improve this answer

You can use tostring() to concat number fields Ex hectares || ' ha' || tostring(id)

share|improve this answer

You can also append text or put spaces between using alternate quotations:

 "Streetnum" || ' ' || "Streetname"
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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