Top 5 Hitters?
From: Frank R. Talbott <talbof_at_eniac>
Date: 1995/07/22
Message-ID: <Pine.SOL.3.91.950722203044.17198A-100000_at_eniac>#1/1
ERROR at line 6:
ORA-00936: missing expression
Date: 1995/07/22
Message-ID: <Pine.SOL.3.91.950722203044.17198A-100000_at_eniac>#1/1
This code ( which is supposed to select the top 5 hiitters from baseball
tables)
gives me the error below.
select P.SSN, P.PlayerFirstName, P.PlayerLastName,
SUM(PS.Hits) TotalHits
from PLAYER P, PLAYER_STATS PS
where P.SSN = PS.SSN
group by P.SSN
having COUNT(select *
from PLAYER_STATS P2S where P2S.Hits < TotalHits) < 5; order by SUM(PS.Hits);
I get the following error ...
having COUNT(select *
*
ERROR at line 6:
ORA-00936: missing expression
What am I doing wrong?
Thanks,
Frank
Received on Sat Jul 22 1995 - 00:00:00 CEST