1

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

Josh J
  • 11
  • 1
  • 1
    What is the type of your columns? To concatenate two string you should use || instead of the plus sign. – Alexandre Neto Oct 09 '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 09 '14 at 16:25

1 Answers1

1

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?

underdark
  • 84,148
  • 21
  • 231
  • 413