I have this procedure:
CREATE OR REPLACE PROCEDURE buscaturma(cod in INTEGER) AS
nomeT varchar2(20);
BEGIN
dbms_output.put_line('inicio');
IF (cod=0)then
dbms_output.put_line('ZERO');
ELSE
SELECT DS_TURMA
into nomeT
FROM TURMA
WHERE CD_TURMA = cod;
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Não foi possível verificar');
END;
And I execute with this call:
EXECUTE buscaturma(2);
Error message:
Error from line: 22 in command - EXECUTE buscaturma (2) Error Reporting - ORA-06550: line 1, column 8: PLS-00905: object DBAMV.BUSCATURMA is invalid ORA-06550: line 1, column 8: PL / SQL: Statement ignored 06550. 00000 - "line% s, column% s: \ n% s" * Cause: Usually a PL / SQL compilation error. * Action: