Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use RANK in a procedure ?

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
I'm getting the following error when using "RANK" in a procedure.
PLS-00103-Encountered the symbol "(" when expecting the following: , from

The SQL used in the procedure is >>
SELECT t.bookerid,sum(t.billamount)/100000,
rank() over ( partition by to_char
(t.checkoutdate,'YYYYMM')
order by to_char(t.checkoutdate,'YYYYMM'),
sum (t.billamount) desc last nulls )
from taj_rmg_bookermast t

What could be the error ? I have executed this SQL through PL/SQL developer & its working fine.

TIA
RK
 
I think ranking functions weren't supported in PL/SQL in Oracle 8 ("case" was the same). You could try putting it in a view and just referencing the view in the PL/SQL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top