DUDA cursor
Publicado por hserey (1 intervención) el 28/06/2007 16:41:19
Bueno dejo en evidencia mi cursor que me arroja un par de erros que nose como solucionar.
create or replace PROCEDURE orden is
declare
cursor c1 as
select rut , nombre
from empleado
fila c1 % row type ;
begin
open c1;
loop
fetch c1 into fila ;
if ( c1 % notfound );
then
exit
end if;
dnms_output.put_line(fila.rut ||' '|| fila.nombre);
end loop;
close c1;
end ;
errores:
Error(3,1): PLS-00103: Se ha encontrado el símbolo "DECLARE" cuando se esperaba uno de los siguientes: begin function package pragma procedure subtype type use form current cursor external language
create or replace PROCEDURE orden is
declare
cursor c1 as
select rut , nombre
from empleado
fila c1 % row type ;
begin
open c1;
loop
fetch c1 into fila ;
if ( c1 % notfound );
then
exit
end if;
dnms_output.put_line(fila.rut ||' '|| fila.nombre);
end loop;
close c1;
end ;
errores:
Error(3,1): PLS-00103: Se ha encontrado el símbolo "DECLARE" cuando se esperaba uno de los siguientes: begin function package pragma procedure subtype type use form current cursor external language
Valora esta pregunta


0