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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL question

SQL question

From: Rok Kodrun <rok.kodrun_at_uni-lj.si>
Date: Thu, 28 Jun 2001 06:53:33 -0700
Message-ID: <F001.0033BC6F.20010628065127@fatcity.com>

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)
<SPAN

class=962584213-28062001> 
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.
<SPAN

class=962584213-28062001> 
Please
help
<SPAN

class=962584213-28062001> 
<SPAN

class=962584213-28062001>Rok
  Received on Thu Jun 28 2001 - 08:53:33 CDT

Original text of this message

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