Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> How do I make a simpleSimple PL/SQL Counter

How do I make a simpleSimple PL/SQL Counter

From: Peter Hazelton <peterhazelton_at_hotmail.com>
Date: Tue, 29 Aug 2000 18:25:11 GMT
Message-Id: <10603.115763@fatcity.com>


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;

  return(var_count);
end;

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



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at Received on Tue Aug 29 2000 - 13:25:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US