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

Home -> Community -> Usenet -> c.d.o.server -> Can this be done in SQL ?

Can this be done in SQL ?

From: Matt Randle <matt_at_imat.demon.co.uk>
Date: Mon, 14 Jun 1999 19:11:05 +0100
Message-ID: <929384284.13894.0.nnrp-08.d4e48d0d@news.demon.co.uk>


If the results of a query return a list of items sorted by date, is there anyway of selecting the last 'n' items from the list before a given date. For example, if the results of the query are,

Item ID       Date
=====        ====

1                 1/1/99
2                 1/4/99
3                 1/8/99
4                 1/10/99
5                 1/12/99

An example query might be to return the ID's of the 2 items with a date prior to 1/9/99 which should return ID's 2 and 3.

Can this be done in one SQL statement ??

Thanks,

Matt. Received on Mon Jun 14 1999 - 13:11:05 CDT

Original text of this message

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