Home » Developer & Programmer » Forms » Percentiles in forms?
Percentiles in forms? [message #173380] Mon, 22 May 2006 03:49 Go to next message
axehigh
Messages: 9
Registered: March 2006
Junior Member
I've got a forms application that need to use percentiles.

I've tried to create a cursor in a package (in forms) and get a compilation error. the thing is when I compile it in toad, it works fine. I am using forms 6i, toad 8.5 and the database is 9.2.

I am suspecting the cause could be an old forms version?
¨
Below is the cursor that's causing the problem. It stops at the first "within group":

      
cursor c_tab(i_aar in varchar2, i_perc in number , i_limit in number ) is
				SELECT   impeks, varenr,
				         PERCENTILE_CONT (i_perc / 100)         WITHIN GROUP (ORDER BY verdi/ mengde) ,
				         PERCENTILE_CONT ((100 - i_perc) / 100) WITHIN GROUP (ORDER BY verdi/ mengde) ovre,
				         COUNT (*) antall
				    FROM uth_varelinjer
				   WHERE SUBSTR (publmnd, 1, 4) = i_aar
				  HAVING COUNT (*) >= i_limit
				GROUP BY varenr, impeks;
Re: Percentiles in forms? [message #173389 is a reply to message #173380] Mon, 22 May 2006 04:46 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Yep, you're hitting a limitation in Forms. The PL/SQL engine of Forms 6i can't handle this select. I suggest you move it to the database.

MHE
Re: Percentiles in forms? [message #173392 is a reply to message #173389] Mon, 22 May 2006 05:00 Go to previous message
axehigh
Messages: 9
Registered: March 2006
Junior Member
Thanks Maaher.

I'm thinking putting the select statement in a package cursor. I would think its possible to return a cursor like this to forms?



Previous Topic: what is wrong with this code.??!
Next Topic: To be E-mail Report directly Forms
Goto Forum:
  


Current Time: Fri Sep 20 09:30:35 CDT 2024