Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL question
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