On Fri, Apr 27, 2001 at 09:52:26AM -0500, Len Morgan wrote:
> >What I'd like to do is pull a list of records where there is a range of
> >last names; say from A - F.
> >select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%' -
> >for example.
> >The above code I've tried for this doesn't seem to work as I'd expect it
> SELECT * FROM table WHERE last_name BETWEEN 'A' AND 'Fzzzzzzzzzzzzz' ;
> worked for me.
> You could also use BETWEEN 'A' AND 'G' to avoid all of the zzzzzzzzs at the
> end. Crude but effective.
how about regex?
select * from tbl where fld ~ '^[A-F]';
don't visit this page. it's bad for you. take my expert word for it.
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
In response to
pgsql-general by date
|Next:||From: will trillich||Date: 2001-04-27 21:05:56|
|Subject: Re: last comma inside "CREATE TABLE ()" statements|
|Previous:||From: Vince Vielhaber||Date: 2001-04-27 20:50:26|
|Subject: Re: [HACKERS] While we're on the subject of searches...|