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: [Q]SQL Question

Re: [Q]SQL Question

From: Kristian Damm Jensen <kristian-Damm.Jensen_at_capgemini.dk>
Date: 1998/10/02
Message-ID: <3614A548.1169598@capgemini.dk>#1/1

select t2.dep

    , t2.emp
    , t2.salary - t1.salary as difference from tab t1, tab t2
where t2.rownr % 2= 1 -- even rownumbers and t2.rownr = t1.rownr + 1

This is assuming that you have no "holes" in the numbering, and that the relevant employees always comes in pairs.

Kristian

Ng K C Paul wrote:

> How can I select the result after I add a rownumber or identity to the table?
>
> <snip>:
Received on Fri Oct 02 1998 - 00:00:00 CDT

Original text of this message

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