I have the following small function that does not compile:
function f_query_01 Return interval Day to second is
start_time timestamp(3);
end_time timestamp(3);
time_diff interval Day to second;
c_query_number number;
begin
start_time := systimestamp;
select count(*) into c_query_number from wg; <--This is the line that errors out
end_time := systimestamp;
time_diff := start_time - end_time;
return time_diff;
end f_query_01;
The compiler gives me the following errors:
Error(29,3): PL/SQL: SQL Statement ignored Error(29,44): PL/SQL: ORA-04044: procedure, function, package, or type is not allowed here
How can I correct this? Thanks!!