title: PL/SQL Oracle - Encountered the symbol “end-of-file”
body: <p>I'm trying to make a procedure which gives grants to users on a certain type of objects</p>
  
  <p>Here's what I did</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE grants AS
  DECLARE
     Cursor c IS select OBJECT_NAME as view_name from all_objects where object_type in ('VIEW');
  
  BEGIN
      FOR tmp in c
      LOOP
          EXECUTE IMMEDIATE 'GRANT ALL on ' || tmp.view_name ||  ' TO my_users';
      END LOOP;
  END;
  </code></pre>
  
  <p>But I'm getting an 'end-of-file' symbole encountered [...]' error...</p>
  
  <p>Do you guys have an idea to make this procedure work ?</p>