From: | Vince Vielhaber <vev(at)michvhf(dot)com> |
---|---|
To: | Daryl Beattie <dbeattie(at)insystems(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Selecting Varchar range. |
Date: | 2002-08-12 12:48:44 |
Message-ID: | Pine.BSF.4.40.0208120846260.8273-100000@paprika.michvhf.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 12 Aug 2002, Daryl Beattie wrote:
> Dear PostgreSQL people,
>
> I didn't find this in the archives or the idocs, so...
>
> How does one select a varchar range? The meaning of my question is
> best illustrated by the following completely hypothetical and totally
> imaginary situation:
> Let's say I have a table of musical artists:
>
> CREATE TABLE Artists (
> Id SERIAL PRIMARY KEY,
> Name VARCHAR(100)
> );
>
> And I want to eventually display only the artists from 'Aa' to 'Am'.
> Naturally doing a select where Name like 'A%' will not return me what I
> want.
> Any ides on how to do this? [Will "SELECT Name FROM Artists WHERE
> Name > 'Aa%' AND Name < 'Am%';" work?]
>
> Bonus question: How do I select artists whose names start with a
> number?
Think REGEX. A[a-m]% [0-9]%
If any of your artists are indies, send them to www.unknown-artists.com
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
http://www.camping-usa.com http://www.cloudninegifts.com
http://www.meanstreamradio.com http://www.unknown-artists.com
==========================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Randall Perry | 2002-08-12 13:44:08 | Re: Craetalang function can't find libgcc_s.so.1 on |
Previous Message | Daryl Beattie | 2002-08-12 12:43:42 | Selecting Varchar range. |