title: Oracle procedure doesn't compile; gives a "Encountered the symbol; when expecting..." error
body: <pre><code>create or replace PROCEDURE ResumenActividadDiaria(Fecha DATE) AS
    CURSOR cur_trans IS
    SELECT t.idslot, t.tipotransaccion, t.transacciongeneral, t.valortransaccion,
           s.fila, s.columna
      FROM  transaccion t, slot s
      WHERE t.idslot = s.idslot AND
            t.transacciongeneral in (1,3) AND
            t.fechacreacion = Fecha
      ORDER BY s.fila, s.columna, t.tipotransaccion, t.transacciongeneral;            
  
    rs_trans cur_trans%ROWTYPE;       
  
    vlIdSlot NUMBER(10);
    vlTipoTransaccion NUMBER(1);
    vlTransaccionGeneral NUMBER(1);
    vlValorTransaccion NUMBER(10);
    vlFila NUMBER(2);
    vlColumna NUMBER(2);     
  BEGIN
    dbms_output.put_line('Fecha ' );
    dbms_output.put_line('                          ------------------------------------------------------');
    OPEN cur_trans;
  
    FETCH cur_trans INTO rs_trans;
    WHILE cur_trans%found 
    LOOP
      FETCH cur_trans INTO rs_trans;
      dbms_output.put_line('Id         :' || rs_trans.vlIdSlot);
      dbms_output.put_line('Fila       :' || rs_trans.vlFila);
      dbms_output.put_line('Columna    :' || rs_trans.vlColumna);
  
      IF vlTransaccionGeneral = 1 THEN                
        IF vlTipoTransaccion = 1 THEN
          dbms_output.put_line('Billetes I :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 2 THEN
          dbms_output.put_line('Monedas  I :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 3 THEN
          dbms_output.put_line('Premios  I :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 4 THEN
          dbms_output.put_line('Creditos I :' || rs_trans.vlValorTransaccion);
        END IF;
      END IF;
  
      IF vlTransaccionGeneral = 3 THEN                
        IF vlTipoTransaccion = 1 THEN
          dbms_output.put_line('Billetes F :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 2 THEN
          dbms_output.put_line('Monedas  F :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 3 THEN
          dbms_output.put_line('Premios  F :' || rs_trans.vlValorTransaccion);
        END IF;
  
        IF vlTipoTransaccion = 4 THEN
          dbms_output.put_line('Creditos F :' || rs_trans.vlValorTransaccion);
        END IF;
      END IF; 
    END LOOP;
  
    CLOSE cur_trans;  
  END;
  </code></pre>
  
  <p>On compiling the above function i get the following error:</p>
  
  <pre><code>Error(58,4): PLS-00103: Encountered the symbol ";" when expecting one of the following:     loop 
  </code></pre>
  
  <p>Please help me to resolve this issue.</p>