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

Home -> Community -> Usenet -> c.d.o.tools -> SQL problem

SQL problem

From: Rok Kodrun <rok.kodrun_at_uni-lj.si>
Date: Thu, 28 Jun 2001 19:59:29 +0200
Message-ID: <9hfra1$cme$1@goodnews.ijs.si>

I have a LOG table with LOG_ID, TIME and TEKST columns I want to get records for the last hour (or certain time) (x records) and if less then N records in last hour, then get also last N-x records so that I get N records alltogether. And I wnat them ordered descening (last record first)

I tried with embedded select with ROWNUM and COUNT and so on but failed to get right records, because you can not order in embeded SELECT.

Please help

Rok Received on Thu Jun 28 2001 - 12:59:29 CDT

Original text of this message

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