Re: jumping to records

From: John Alexander <jalexander_at_summitsoftwaredesign.com>
Date: 2000/06/18
Message-ID: <Jga35.4637$ez6.21777_at_typhoon.tampabay.rr.com>#1/1


You can include an order by clause to retrieve the specific name first:

select *
  from employees
order by decode(name,'aaron',0,1), name;

This will give the one you are looking for first, followed by all the rest sorted by name.

A D Hager <adhager_at_its.brooklyn.cuny.edu> wrote in message news:394C64AF.D184EAE2_at_its.brooklyn.cuny.edu...
>
> Is it possible to select all records from a table but to jump to a
> particular one?
> for example suppose I want to retrieve all records from a table but I
> want to start somewhere in the middle.
> If I execute
> select * from employees where name='aaron'
> I will only get one record.
> If I execute
> select * from employees;
> I will only get all the records and will have to retrieve many records
> before finding the one I am looking for.
>
> Thanks a lot,
>
> Aaron
>
>
>
>
>
Received on Sun Jun 18 2000 - 00:00:00 CEST

Original text of this message