[GIS] QGIS select features from attribute table using the “LIKE” operator

attribute-tableqgisselect-by-attribute

I created an expression with the help of the GUI in the QGIS attribute table of a vector (shapefile) layer of Native American ("Indian") reservations in the USA state of New Mexico.

"NAME" LIKE 'Picuris'

No row became selected.

The full "NAME" in the desired row is 'Picuris Indian Reservation' . I don't mind typing the whole name, but in principle, is not the LIKE function supposed to find partial matches? That is, if I want 'State Hwy 68' (which is in the FULLNAME field) (of a different layer), will the LIKE operator not find it if I use "FULLNAME" LIKE 'Hwy 68' ?

Best Answer

You can also use the column filter of the attribute table. It works default as a 'like' expression without the % wild card.

enter image description here

Result when typing a:

enter image description here

Related Question