Hi Ralf,

> Hi castors,

> do anyone have an Oracle server with version prior to 8.1.6 (e.g. 8.0.x or
> 7.x) runing and can try if the following query can be executed.

Yes, it (partly) works for 8.0.5 dbs:

SELECT * FROM (
    SELECT t1.*, rownum rnk FROM (
        SELECT * FROM emp
    ) t1
) WHERE rnk BETWEEN 5 AND 7
/

It returns for example:

7654    MARTIN  SALESMAN        7698    28.09.2081 00:00:00     1250    1400    30     
 5
7698    BLAKE   MANAGER 7839    01.05.2081 00:00:00     2850            30      6
7782    CLARK   MANAGER 7839    09.06.2081 00:00:00     2450            10      7

The problem is, you can't put an ORDER BY clause in the inner SELECT.
It would only be allowed in the outer SELECT, which is not really, what we want here.
The sorting should occure before the filtering.

Regards,

   Martin

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to