Subject ???HELP ---- CURRENT_TIME - PRINTS THE SAME TIME IN THE LOOP
Author kapilpatil84firebird
Firstly, Thanks To svein_erling to solve my cursor problem.

============================================================
Secondly, I am Facing Another Problem..

Basically I want to display the time taken to run the SP.
Therefore want to get the current_time before & after the while loop.


Following is just the demo SP used to display the current time in a
loop. But the problem is that each time, output prints the same time.

SET TERM !! ;

CREATE OR ALTER PROCEDURE LOOPTIME RETURNS (T VARCHAR(25))
AS
DECLARE VARIABLE I INTEGER;
BEGIN
I = 0;
WHILE (I < 10000) DO
BEGIN
T = CAST(CURRENT_TIME AS VARCHAR(25));
SUSPEND;
I = I + 1;
END
END !!

SET TERM ; !!

SELECT T FROM LOOPTIME;