[Qgis-user] ordering an attribute table

Nathan Woodrow madmanwoo at gmail.com
Fri Sep 27 05:44:25 PDT 2013


Hey Michael,

Try this expression using the advanced selection feature:

regexp_match('column', '\\d*') = 1

This is using a regex to match column as any number of digits (\\d*).  If
it's not a digit it will return 0 so you want to only select the ones that
= 1.

- Nathan



On Fri, Sep 27, 2013 at 10:16 PM, Michael Spencer
<spencer.mike.r at gmail.com>wrote:

> Date: Thu, 26 Sep 2013 18:18:10 +0200
> From: Bernhard Str?bl <bernhard.stroebl at jena.de>
>
>
> Hi,
>
> Am 26.09.2013 18:07, schrieb Michael Spencer:
> > Having a strange problem at the moment.
> >
> > If I open a vector attribute table and click on a column heading to sort
> > the column then this doesn't seem to work. The column contains mainly
> > numbers with some NA and some NULL strings.
> >
> > The sort action groups most together most NA and NULL, and orders the
> > numbers, but some strings slip through the gaps and appear where they
> > aren't wanted in the number sequence!
> >
> > I'm working in QGIS 2.0.1 on Ubuntu 12.04.
> >
> > The reason I want to do this is to delete all records that aren't
> > numeric, so if there's a neater way to accomplish this that would be
> great!
>
> A neater way would be to select the records in question and then simply
> delete the selected. Hint select for nulls with
> <code>"my_field" is null</code>
>
> Thanks Bernhard, this was my original choice. Unfortunately I find the
> select tool a total black box and can't get my head around it. Your
> suggestion works for entries with 'null' in, but I can't get a response
> when I want to select 'nan' values. I've tried as:
>
> <"field" is nan>
> <"field" is 'nan'>
> <"field" = 'nan'>
>
> Both with no joy. Is there a crib sheet somewhere with basic options on?
>
> Ta,
> Michael
>
> Bernhard
>
> >
> > Ta,
> > Michael
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130927/8793cc53/attachment.html>


More information about the Qgis-user mailing list