I try to solve the following question:
Ask the User for nationality, and show the clients with that nationality, for this I used an anonymous block and a procedure that is as follows:
Procedure:
CREATE OR REPLACE PROCEDURE mostrarNacionalidad(nacionalidad IN String2(30)) AS
CURSOS registros is SELECT Nacionalidad FROM clientes WHERE Nacionalidad = nacionalidad;
BEGIN
FOR registro IN registros LOOP
dbms_output.put_line('* * * * * * * * * * * * * * * * * * ');
dbms_output.put_line('Nombre Cliente: ' || registro.NOMBRECLIENTE);
dbms_output.put_line('Nacionalidad: ' || registro.Nacionalidad );
dbms_output.put_line('* * * * * * * * * * * * * * * * * * ');
END LOOP;
END;
This block gives me the following error:
Error at line 13: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
end not pragma final instantiable order overriding static
member constructor map
1. CREATE OR REPLACE PROCEDURE mostrarNacionalidad(nacionalidad IN String2(30)) AS
2. CURSOS registros is SELECT Nacionalidad FROM clientes WHERE Nacionalidad = nacionalidad;
3. BEGIN
I would appreciate if someone could lend me a hand to reshoot it. Thank you very much.