title: How can I fix this "SQL Statement ignored" error?
body: <p>I have the following small function that does not compile:</p>
  
  <pre><code>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;  &lt;--This is the line that errors out
    end_time := systimestamp;
    time_diff := start_time - end_time;
  
    return time_diff;
  
  end f_query_01;
  </code></pre>
  
  <p>The compiler gives me the following errors:</p>
  
  <pre><code>Error(29,3): PL/SQL: SQL Statement ignored
  Error(29,44): PL/SQL: ORA-04044: procedure, function, package, or type is not allowed here
  </code></pre>
  
  <p>What is causing this error and how can I fix it?</p>