690 shaares
3 liens privés
3 liens privés
To make a long running request in Oracle :
View:
create or replace function TEST_PROC return number
IS
start_time DATE := sysdate;
end_time DATE;
curr_time DATE;
id number :=0;
begin
end_time := start_time + interval '3' minute;
loop id := id + 1;
curr_time := sysdate;
exit when curr_time > end_time;
end loop;
return id;
end TEST_PROC;
create or replace VIEW TEST_VIEW (ID) as SELECT TEST_PROC() as ID from dual;
select * from TEST_VIEW;