Re: SQL Question

From: js <71023.200_at_compuserve.com>
Date: 1998/06/23
Message-ID: <358FC5AD.5_at_compuserve.com>#1/1


Ngkc Paul wrote:
>
> A simple testing in SQL+ on oracle 7.3.3
>
> SQL> select (select count(*) from dual) from dual;
> select (select count(*) from dual) from dual
> *
> ERROR at line 1:
> ORA-00936: missing expression
>
> It seems that the select list cannot be a select statment.
>
> I know what you mean. Your SQL is ok for positioning or ranking.
>
> But if we want to get the record number or row number of the result set,
> there may be problem.
>
> On Mon, 22 Jun 1998, Volker Böß wrote:
>
> > Why does it not run on Oracle?
> > With the performance Problem you are right.
> > If you have an enumerated list, you probably have a unique sort key.
> > Otherwise you have to count more than one row for one position.
> > I used this solution to sort a field of players by their score.
> > If two players are at position 2 for example, the next player will
> > follow on position 4 (which is correct in this case).
> >
> >
> >
> >
Thanks for the ideas anyway!
JS- Received on Tue Jun 23 1998 - 00:00:00 CEST

Original text of this message