[GIS] Filter expressions on attribute table

attribute-tableexpressionqgis

I'm new on QGIS, I have shapefile for the whole country and also have for Province down to City/Municipalities, is there any way on attribute table where I can filter using an expression for example:

"PROVNAME" = 'CEBU', but this only for one area.

I tried adding multiple areas, like "PROVNAME" = 'CEBU' 'others' 'others'.

So basically tried that multiples areas, but getting an error:

Parser Error:
syntax error, unexpected STRING, expecting $end

Eval Error:
No root node! Parsing failed? 

Is there anyway I can select multiple areas by expression, so I can extract from a large area shapefile, I'm trying to filter it from country down to province and cities, so I can extract it easily.

Best Answer

From what I understand, what you are looking for is:

"PROVNAME" IN ('CEBU', 'others', 'others')

This will work, but it might not be the best solution if you are trying to select a large number of areas.

Related Question