| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Finding a date
You may try something like this (I am
not sure it will work. I do not have access to
Oracle at this time to check a smilar test out)
SELECT min (a.checklogdate - b.checklogdate), a.checklogdate, min (a.idapp) FROM checklog a,
checklog b
WHERE a.idapp = b.idapp
and a.rowid != b.rowid and a.checklogdate >= '12/10/02' and b.checklogdate >= '12/10/02'
This should give you a list for the deltas between the dates.
Marc Parkinson
"XaFTek" <xaf_at_tekano.fr> wrote in message
news:1011570f.0210230850.4a597b8f_at_posting.google.com...
> Hi !
>
> I have a table named
> checklog
> (
> checklogdate date not null,
> idapp integer not null
> )
>
> By example for idapp=10
> I have thoses lines in the table (date format is DD/MM/YY):
> 20/10/02 10
> 12/10/02 10
> 10/10/02 10
> 09/10/02 10
> 06/08/02 10
> 05/08/02 10
> 04/08/02 10
> 02/08/02 10
> 01/08/02 10
> 30/06/02 10
>
> There is only 1 line by day for an idapp.
>
> Starting down from the date 12/10/02 I want to know when my checklog
> "start record".
> Start record is where checklog began to record my idapp within a 7
> days no recording gap.
>
> For this example I have a session recording form 09/10/02 to 12/10/02
> because there is more than 7 days between 09/10/02 and 06/08/02.
> I have also a session recording from 06/08/02 to 01/08/02.
>
> How can I do that in SQL ?
>
> Thank's in advance.
Received on Fri Oct 25 2002 - 22:29:46 CDT
![]() |
![]() |