infinite loop stored procedure
danielkMar 8 2011 — edited Mar 13 2011I'm trying to create an infinite loop to test an error situation. I'm doing this in stored procedure. I've not created a stored procedure before. I keep getting errors when I write the script. Can you please tell me what I'm doing wrong with this script?
CREATE OR REPLACE PROCEDURE blah.test_timeout
IS
deadline_days number :=1;
grace_period number :=0;
BEGIN
-- get the deadline days
WHILE deadline_days < 4000
LOOP
grace_period := grace_period+1;
dbms_output.put_line ('hi mom');
END LOOP;
RAISE_APPLICATION_ERROR(-20071,'what_error Error:' || sqlerrm(sqlcode));
END;
/
thanks!