Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

stay in loop for a particular time

697349Oct 7 2009 — edited Oct 7 2009
Hi all,
i have a problem in my procedure which iam creating for a simple timer.

the following is the code:
CREATE OR REPLACE PROCEDURE plp_sample_timer(al_minutes IN NUMBER)
AS
ld_sysdate TIMESTAMP DEFAULT systimestamp;
ld_exit_time TIMESTAMP;
BEGIN
ld_exit_time:=ld_sysdate+(al_minutes/60);

dbms_output.put_line(ld_sysdate);dbms_output.put_line(al_minutes/60);
dbms_output.put_line(ld_exit_time);
END;
The input to my procedure will be the time in minutes.
I need to write a loop in my code such that the loop continues for the no.of minutes from current time and exits after the time input in minutes.
also i need to return the start time and end time as a concatenated string...the problem is my exit time calculation itself is going wrong..pls help me out.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2009
Added on Oct 7 2009
15 comments
2,932 views