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: How to do this trick ?

Re: How to do this trick ?

From: wirehub <rob_at_dsdelft.nl>
Date: Fri, 15 Oct 1999 08:53:08 +0200
Message-ID: <939970738.532154@newsreader1.wirehub.nl>

>I have a table with one colum. When I do a select below are the data.
>
>SQL> SELECT MYNUMBER FROM TESTING;
>
> MYNUMBER
>----------
> 1
> 3
> 5
> 10
>
>What I would like to do is how to display a different betwen a row value
>with a previous row value.
>Something like this:
>
> MYNUMBER DIFF
> ---------- -------
> 1 0
> 3 2
> 5 2
> 10 5
>
>Have any idea?
>TIA
>

I don't think this is possible using SQL because it is not a sequential language. Using a plsq-cursor and the dbms_ouput package you _can_ do the trick.

Regards Rob. Received on Fri Oct 15 1999 - 01:53:08 CDT

Original text of this message

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