title: Procedure call inside a PL/SQL block
body: <p>I have some SQL code to populate a database, which works just fine:</p>
  
  <pre><code>INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (1, 1, 1);
  INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (2, 1, 1);
  INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (3, 1, 2);
  
  EXECUTE RESET_SEQUENCE('DOCUMENT_ELEMENT_ID_SEQ', 4);
  </code></pre>
  
  <p>To enhance maintainability, I'm trying to replace some magic numbers with variables. I've never used variables before but I've read I need to use a PL/SQL block so:</p>
  
  <pre><code>DECLARE
      ELEMENT_TEXT SMALLINT := 1;
      ELEMENT_IMAGE SMALLINT := 2;
  BEGIN
  
  INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (1, 1, ELEMENT_TEXT);
  INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (2, 1, ELEMENT_TEXT);
  INSERT INTO PDF_DOCUMENT_ELEMENT (DOCUMENT_ELEMENT_ID, DOCUMENT_ID, ELEMENT_ID) VALUES (3, 1, ELEMENT_IMAGE);
  
  EXECUTE RESET_SEQUENCE('DOCUMENT_ELEMENT_ID_SEQ', 4);
  
  END;
  /
  </code></pre>
  
  <p>This works just fine, except the procedure call:</p>
  
  <pre><code>EXECUTE RESET_SEQUENCE('DOCUMENT_ELEMENT_ID_SEQ', 4);
             *
  ERROR en lÝnea 45:
  ORA-06550: lÝnea 45, columna 9:
  PLS-00103: Se ha encontrado el sÝmbolo "RESET_SEQUENCE" cuando se esperaba uno
  de los siguientes:
  := . ( @ % ; immediate
  El sÝmbolo ":=" ha sido sustituido por "RESET_SEQUENCE" para continuar.
  </code></pre>
  
  <p>The PLS-00103 error translates as:</p>
  
  <blockquote>
    <p>PLS-00103: found 'string' but expected one of the following: 'string'</p>
  </blockquote>
  
  <p>If I change the call to:</p>
  
  <pre><code>EXECUTE IMMEDIATE RESET_SEQUENCE('DOCUMENTO_ELEMENTO_ID_SEQ', 4);
  </code></pre>
  
  <p>... I get this:</p>
  
  <pre><code>PLS-00222: en este ßmbito no existe ninguna funci¾n cuyo nombre sea
  'RESET_SEQUENCE'
  ORA-06550: lÝnea 45, columna 1:
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>... that translates as:</p>
  
  <blockquote>
    <p>PLS-00222: no function with name 'string' exists in this scope</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Am I using variables correctly or there's a better solution for my initial goal?</li>
  <li>What do I need to fix in my procedure call syntax and why?</li>
  </ol>