I am in QGIS trying to combine a Zip code and City (separate columns) together and my methods are not working. Here is a screenshot of the issue.

enter image description here

  • 1
    What is the type of your columns? To concatenate two string you should use || instead of the plus sign. – Alexandre Neto Oct 9 '14 at 15:44
  • Along with @AlexandreNeto statement, you may want to separate these two field values with a space. For this you will have to use single quotes with a space (or some other deliminator) between the pipe character, e.g. "CITY_1" || ' ' || "zip" OR "CITY_1" || '-' || "zip" – artwork21 Oct 9 '14 at 16:25

String concatenation using the + operator has only been added in 2.6. For all older versions you have to use || to concatenate strings.

See also Is there a way to concatenate fields in field calculator of QGIS?

  • ah... that I didn't know. Nice! – Alexandre Neto Oct 9 '14 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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