Re: Select Non Alpha Contents of a Column

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Hunter Hillegas <lists(at)lastonepicked(dot)com>, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Select Non Alpha Contents of a Column
Date: 2003-12-29 23:21:45
Message-ID: 20031229232145.90507.qmail@web20811.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


--- Hunter Hillegas <lists(at)lastonepicked(dot)com> wrote:
> Is there a way to select all rows where a certain
> column starts with
> non-alpha characters?
>
> I would like to select all the rows that don't start
> with letters.
>
> Possible?

Regular expressions would do what you want, e.g.
"select * from mytable where myfield !~ '^[a-zA-Z]';"
Look under "pattern matching" in the "functions and
operators" section of the manual (I think, working
from memory).

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

In response to

Browse pgsql-general by date

  From Date Subject
Next Message B. van Ouwerkerk 2003-12-29 23:24:47 Re: Is my MySQL Gaining ?
Previous Message Jeff Eckermann 2003-12-29 23:18:46 Re: [pgsql-advocacy] Is my MySQL Gaining ?