title: How to call a pl/sql anonymous block from an pl/sql anonymous block
body: <p>I have the following PL/SQL block and it's working fine. I would like to call this function (TimeToFrame) but from another PL/SQL block. </p>
  
  <p>I cannot declare this function in a procedure or package that is stored in the DB. In other words how can I call a pl/sql from another pl/sql where both pl/sql are anonymous blocks??</p>
  
  <p>What if I put that function in a separate .sql file. Can't I call that .sql file from my anonymous block and pass it some IN parameters and have that fct return OUT params?</p>
  
  <pre><code>Declare
  nTime Number;
  
  FUNCTION TimeToFrame(pTime IN Varchar2)
  return NUMBER IS
  nTime NUMBER;
  BEGIN
  select (SUBSTR(pTime, 1, 2) * 108000)+(SUBSTR(pTime, 4, 2) * 1800)+(SUBSTR(pTime, 7, 2)     * 30)+SUBSTR(pTime, 10, 2)
   into nTime
   from dual;
   return nTime;
  END TimeToFrame;
  
  Begin
  nTime:=TimeToFrame('47:59:59:29');
  DBMS_OUTPUT.PUT_LINE(nTime);
  End;
  </code></pre>