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: Sql Help

Re: Sql Help

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Fri, 29 Jul 2005 13:46:21 +0000 (UTC)
Message-ID: <dcdbvc$4o7$1@klatschtante.init7.net>


On 2005-07-29, kishanthakker_at_gmail.com <kishanthakker_at_gmail.com> wrote:
> I have a very specific problem with oracle 8.0.4.
>
> i have following view
> cum_fifo_figures
> (
> fnd_code varchar2(8),
> txn_dt date,
> txn_no number(3),
> cum_unt number(7),
> cum_amt number(7)
> )
>
> its in order of fnd_code,txn_dt,txn_no
>
> I want to select value of cum_amt of previous row
> while selecting fnd_code,txn_dt,txn_no.
>
> note : in case of first row it should select value from current row.

Look into the lag(..., 1) over(....) analytical function

hth
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Fri Jul 29 2005 - 08:46:21 CDT

Original text of this message

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