You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Kai Ponte <ka...@perfectreign.com> on 2008/05/29 06:20:01 UTC
Select Alpha Rows
I have a table, which is a list of names and other information about people
I want to select only those names that - say - are between A and C, then
select D through G, and so on.
I can't seem to figure out how to do this.
Do I need to setup a View that sorts all names and select between them?
--
kai
www.filesite.org || www.4thedadz.com || www.perfectreign.com
remember - a turn signal is a statement, not a request
Re: Select Alpha Rows
Posted by Kai Ponte <ka...@perfectreign.com>.
On Wednesday 28 May 2008 09:27:54 pm Robert J. Carr wrote:
> Just a guess ( assuming [A,C) ):
>
> select * from table where (name >= 'A' and name < 'C') or (name >= 'D'
> and name < 'G')
That's what I originally thought and tried.
Seemed simple enough. :P
I think I have the greaterthan and equal messed up.
select FIRSTNAME, LASTNAME, TITLE, EMAIL from DBUSER.CONTACTS WHERE LASTNAME
>= 'A' AND LASTNAME <= 'F'
That seemed to work.
<insert homer simpson remark here>
Thanks!!!
--
kai
www.filesite.org || www.4thedadz.com || www.perfectreign.com
remember - a turn signal is a statement, not a request
Re: Select Alpha Rows
Posted by "Robert J. Carr" <rj...@gmail.com>.
Just a guess ( assuming [A,C) ):
select * from table where (name >= 'A' and name < 'C') or (name >= 'D'
and name < 'G')
On Wed, May 28, 2008 at 9:20 PM, Kai Ponte <ka...@perfectreign.com> wrote:
> I have a table, which is a list of names and other information about people
>
> I want to select only those names that - say - are between A and C, then
> select D through G, and so on.
>
> I can't seem to figure out how to do this.
>
> Do I need to setup a View that sorts all names and select between them?
>
>
> --
> kai
> www.filesite.org || www.4thedadz.com || www.perfectreign.com
> remember - a turn signal is a statement, not a request
>