Percentiles in forms? [message #173380] |
Mon, 22 May 2006 03:49 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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;
|
|
|
|
|