JPCogAdmin
Programmer
I get an error when trying to issue the following simple query. I'm using a cursor and an inline view and using the analytic function DENSE_RANK() over(). It's complaining about following error:
Error(32,8): PLS-00103: Encountered the symbol "GOT" when expecting one of the following: := . ( @ % ;
Error(34,136): PLS-00103: Encountered the symbol "(" when expecting one of the following: , from
code looks like this:
**********************************************************
cursor got is
'select t.name, t.calls, t.TMIN,t.MINS,t.Ranking
from ( select name, count(*) calls,sum(num_calls) TMIN, to_char((count(*)/sum(num_calls)),'999999') MINS, DENSE_RANK() over (order by count(*) desc) Ranking from table1 group by name) T
where Ranking<=10';
**********************************************************
Does someone know how to fix the problem? Ii, read on google that previous versions of Oracle ie. 8i,9i has problems with the DENSE_RANK() function. Now, I wonder if that's still the same with Oracle 10G V.2 (mine). Thanks for any solution you might provide.
-JP
Error(32,8): PLS-00103: Encountered the symbol "GOT" when expecting one of the following: := . ( @ % ;
Error(34,136): PLS-00103: Encountered the symbol "(" when expecting one of the following: , from
code looks like this:
**********************************************************
cursor got is
'select t.name, t.calls, t.TMIN,t.MINS,t.Ranking
from ( select name, count(*) calls,sum(num_calls) TMIN, to_char((count(*)/sum(num_calls)),'999999') MINS, DENSE_RANK() over (order by count(*) desc) Ranking from table1 group by name) T
where Ranking<=10';
**********************************************************
Does someone know how to fix the problem? Ii, read on google that previous versions of Oracle ie. 8i,9i has problems with the DENSE_RANK() function. Now, I wonder if that's still the same with Oracle 10G V.2 (mine). Thanks for any solution you might provide.
-JP