When trying to compile the following function:
CREATE OR REPLACE FUNCTION f_id_fornecedor(Nomefornecedor in varchar(50))
RETURN integer IS
codigoforncedor integer;
BEGIN
SELECT codfornecedor INTO codigofornecedor FROM TBFORNECEDOR WHERE NOFORNECEDOR=Nomefornecedor;
IF codigofornecedor <> NULL THEN
RETURN codigofornecedor;
ELSE Raise_Application_Error(-20004,
'Fornecedor não existe: ' || nomefornecedor);
END IF;
END;
I get the following error:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
: =. ), @% default character The symbol ":=" was substituted for "(" to continue.
Compile error at line 1, column 53 PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
; The symbol ";" was substituted for "end-of-file" to continue.
Compile error at line 12, column 21