Re: SQL Question
Date: 1998/06/22
Message-ID: <Pine.SOL.3.96.980622201550.19139A-100000_at_imsnispc01.netvigator.com>#1/1
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
*
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?
ERROR at line 1:
ORA-00936: missing expression
> 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).
>
>
>
>
Received on Mon Jun 22 1998 - 00:00:00 CEST