[Qgis-user] attribute query by substring or regexp

maning sambale emmanuel.sambale at gmail.com
Fri Jan 28 01:05:04 PST 2011


Noli and Volker,

Thanks for the tip.  I'll try both approach.

2011/1/28 Volker Fröhlich <volker27 at gmx.at>:
> For shapefiles, the tilde operator doesn't seem to work for queries, but it
> works in the attribute table's search. That could be a starting point for an
> export, if that is acceptable.
>
> FIELD_NAME ~ '^2'
>
> The Regular Expression above selects geometry which's field_name starts with a
> 2.
>
> Otherwise you could use LIKE and ILIKE, but they are not as powerful. They
> should also work for querying shapefiles.
>
> And as Noli said, conversion is also a possibility.
>
> You might want to see
>
> http://www.postgresql.org/docs/8.1/static/functions-matching.html
>
>
> Volker
>
>
> Am Donnerstag 27 Januar 2011, 02:01:23 schrieb maning sambale:
>> Hi,
>>
>> Any tips on conducting substring query to limit display of polygons?
>> For example, I was given a point shapfile containing a long
>> description text n the attribute table and I want to select/display
>> only the polygons containing a series of substring/text/values.
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------



More information about the Qgis-user mailing list