| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How do I make a simpleSimple PL/SQL Counter
Hi,
The problem in the code is the line which has
:elapsed_time;
In my experience, I have never seen an assignment like this.
Is this because of a "cut-and-paste" operation ? If the actual code is like this, then u better change this line...
Regards
Rajagopal Venkataramany
On Tue, 29 Aug 2000 11:27:07 -0800, ORACLE-L_at_fatcity.com wrote:
>  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 
>  http://profiles.msn.com.
>  
>  -- 
>  Author: Peter Hazelton
>    INET: peterhazelton_at_hotmail.com
>  
>  Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>  San Diego, California        -- Public Internet access / Mailing Lists
>  --------------------------------------------------------------------
>  To REMOVE yourself from this mailing list, send an E-Mail message
>  to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>  the message BODY, include a line containing: UNSUB ORACLE-L
>  (or the name of mailing list you want to be removed from).  You may
>  also send the HELP command for other information (like subscribing).
>  
Regards
Rajagopal Venkataramany
![]()  | 
![]()  |