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: SQL puzzle

Re: SQL puzzle

From: Marc Blum <marc_at_marcblum.de>
Date: Sat, 16 Feb 2002 18:28:53 GMT
Message-ID: <3c6ea475.34688379@news.online.de>


only a hint, but no code:

did you consider the new analytic functions introduced with 8.1.6? You can do rather tricky things with impressive performance boosts.

On 15 Feb 2002 06:15:52 -0800, groups_at_karsten-schmidt.com (Karsten Schmidt) wrote:

>Hi all,
> I am trying to come up with a sql query that solves the following question:
>
>I have a table like
>
>DEVICE time status
>A 10:00 up
>A 10:30 up
>A 10:45 down
>A 10:48 up
>B 9:00 up
>B 10:00 up
>... etc, i guess you get the idea.
>the rows represent samples of device availability.
>
>I would like to have a result like
>Device status from to
>A up 10:00 10:45
>A down 10:45 10:48
>A up 10:48 (null)
>B up 9:00 (null)
>
>I have been trying to figure this out for quite a while, all i could
>come up with was a stored procedure that populates a table.
>
>I would really appreciate some help on this. maintaining that separate table
>is both slow and hard to keep in sync.
>
>This is for a datawarehousing application on Oracle 8.1.7.2 EE / HP 64 Bit
>
>Karsten

regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Sat Feb 16 2002 - 12:28:53 CST

Original text of this message

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