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

Home -> Community -> Usenet -> c.d.o.misc -> Re: select changes in row values?

Re: select changes in row values?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Thu, 28 Jun 2007 06:46:31 -0700
Message-ID: <1183038391.337883.163950@w5g2000hsg.googlegroups.com>


On Jun 28, 12:03 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> "aksel.schmidt" <axl.schm..._at_gmail.com> a écrit dans le message de news: 1183002507.493893.104..._at_k79g2000hse.googlegroups.com...
> | there is an ordering - just left out for simplicity
> | assume another column named 'timestamp' exists - some client is then
> | asked to put a row in the table (timestamp, value) on a periodical
> | basis. this timestamp value is continously incrementing and used for
> | ordering the select
> |
> | after a while, another client wants to retrieve only changes over time
> | in those values (there are many other columns which values changes on
> | each insert - it is thus not the inserting clients fault)
> |
> | does it make sense now?
> |
> | /aksel
> |
>
> Have a look at lag/lead functions.
>
> Regards
> Michel Cadot

Aksel, leaving out vital information does not make sense. As suggested the analytic queries using lead and lag might be of use. You might also just need to use a between clause to show all entries for A that fall between two timestamps. A max(timestamp) for a specific key would be the most recent or last updated row.

If you do not have what you need then repost with a full explantion and valid sample data.

HTH -- Mark D Powell -- Received on Thu Jun 28 2007 - 08:46:31 CDT

Original text of this message

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