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 -> Re: selecting records

Re: selecting records

From: Philippe <parnaud_at_yahoo.com>
Date: Wed, 27 Jan 1999 14:15:55 +0100
Message-ID: <78n3oa$cif$1@concorde.ctp.com>


Hi,

Try this :

SELECT /*+ RULE */ * FROM YOUR_TABLE T, DUAL D WHERE SYSDATE - T.YOURDATEFIELD = DECODE(D.DUMMY(+),NULL,NULL) AND ROWNUM < 11
ORDER BY T.YOURDATEFIELD DESC HTH, Philippe

G. Kakisina wrote in message <78kb1f$9dm$1_at_freyja.bart.nl>...
>Hi,
>
>I want to select several records using rownum. This works fine but it
doesnt
>work properly with 'ORDER BY'. It doesn't show the records i want.
>For example; I want to select the ten newest records from my table. The
>table contains a date field.
>How can i do this?
>
>G. K.
>
>
Received on Wed Jan 27 1999 - 07:15:55 CST

Original text of this message

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