Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> How do I make a simpleSimple PL/SQL Counter
Hi there
I have created a report and one of my fields is called elapsed_time. This is one of my fields I obtained from the SQL call of the report. I want to build a simple counter using a PL/SQL function with a loop that simply goes through and adds one to the running total. The following is the code I have used and it does not work of course but I was wondering if I am close?
function CF_COUNTFormula return Number is
var_count number := 0;
begin
loop :elapsed_time; var_count := var_count +1; exit when :elapsed_time%notfound; END LOOP;
My ultimate goal is to use this counter to get the 25 percentile record as well as the 75th percentile record. This is why I need to use this type of counter and not the built in summary counter.
Any help is, as always, incredibly appreciated.
Peter
Share information about yourself, create your own public profile at Received on Tue Aug 29 2000 - 13:25:11 CDT