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

Home -> Community -> Usenet -> c.d.o.tools -> Elapse Time in PL/SQL Procedure?

Elapse Time in PL/SQL Procedure?

From: Tim Lindsey <timothy.d.lindsey_at_boeing.com>
Date: Thu, 12 Oct 2000 21:25:50 GMT
Message-ID: <G2C6JE.EFB@news.boeing.com>

Please reply directly via email. I'm using Oracle 8i (8.1.6 on NT). Thanks!

I want to capture elapse time in a PL/SQL procedure in hours and seconds and put it in a variable.
I tried capturing sysdate at the start and end and subtracting them. That didn't work.
I found the "TIMING START X" command and it seems to do what I want but it won't compile in a procedure.
Can any one help me?

CREATE OR REPLACE PROCEDURE bamb.PR_TEST IS
sum_count NUMBER;
elapse_time varchar2(25);
BEGIN
timing start elapse_time;
-- do what ever here

timing stop elapse_time;
-- output to a table here

END;
/

This gets me the following error:

10/8     PLS-00103: Encountered the symbol "START" when expecting one of
         the following:
         := . ( @ % ;
Received on Thu Oct 12 2000 - 16:25:50 CDT

Original text of this message

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