I have a shapefile and I want to label all shapes with a "B" or "A" in its name (string). All others should be ignored.

Like: If [field] contains "B" draw label

Im using qgis 2.0.

CASE WHEN strpos("Column", 'A') > -1 OR strpos("Column", 'B') > -1 THEN "Column" END

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.