Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Selecting rows near a particular row

Selecting rows near a particular row

From: Rasel Khan <rasel.khan_at_corp.vizzavi.net>
Date: 23 May 2002 02:40:55 -0700
Message-ID: <c6944fff.0205230140.5644e135@posting.google.com>


Hi,

I want to list items near a particular item in an indexed database, e.g. if the items are ordered into

a,b,c,d,e,f,g,h,i,j ...

and I am looking for 'f'

then I want the rows representing e,f,g or e,g,h if f does not exist,

Any help will be appreciated - The thing is I can't do select * from table where id >= f-3 limit 5 --- or can I ,

Thanks in advance, - this must be a common problem - but I for one don't know the solution,

Rasel Received on Thu May 23 2002 - 04:40:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US