2

I am trying to concatenate two fields into one label, where the second field sometimes has a NULL value.

The first field is a numerical street address (ADR_NO) the second field is a text string (ADR_NO_SFX).

I want to combine them like this: 13, 13A, 14, 15, 15A, etc

I tried the solution here Displaying multiple fields as labels if one field is null in QGIS? but the expression dialogue throws an error.

I also tried this, but I get empty labels whenever "ADR_NO_SFX" is NULL.

CASE WHEN  "ADR_NO_SFX" = NULL
  THEN "ADR_NO"
  ELSE "ADR_NO" || '-' || "ADR_NO_SFX"
END
1
  • 3
    try is null rather than = null
    – csk
    Commented Jan 31, 2019 at 20:27

0

Browse other questions tagged or ask your own question.