title: Error(26,14): PLS-00103: Encountered the symbol <cursor> when expecting one of the following: := . ( @ % ;
body: <p>I am currently new to oracle with a MSSQL knowledge. currently, i am writing down few procedures to understand the syntax . I am not able to compile the following procedure. Not sure what is going wrong . I am constantly facing the error</p>
  
  <pre><code>Error(26,14): PLS-00103: Encountered the symbol "CRIT_CURSOR" when expecting one of the following:     := . ( @ % ; 
  </code></pre>
  
  <p>Below is the code:</p>
  
  <pre><code>create or replace 
  PROCEDURE STUDY_ORA
  AS
  BEGIN  
    DECLARE 
      CRITVALID INTEGER;
  
      CURSOR CRIT_CURSOR IS
        SELECT ID FROM USERLIST;
  
    BEGIN
      OPEN CRIT_CURSOR;
  
      LOOP
        FETCH CRIT_CURSOR INTO CRITVALID;
        EXIT WHEN CRIT_CURSOR%NOTFOUND;
  
        DBMS_OUTPUT.PUT_LINE(CRITVALID);
      END LOOP;
  
      CLOSE CRIT_CURSOR  ;
    END;
  
    CURSOR CRIT_CURSOR IS
      SELECT ID FROM TXSLIST;
  
    BEGIN
      OPEN CRIT_CURSOR;
  
      LOOP
        FETCH CRIT_CURSOR INTO CRITVALID;
        EXIT WHEN CRIT_CURSOR%NOTFOUND;
  
        DBMS_OUTPUT.PUT_LINE(CRITVALID);
      END LOOP;
  
      CLOSE CRIT_CURSOR ;
    END; 
  END;
  </code></pre>
  
  <p>I would appreciate if someone can provide some insights . thanks.</p>