Error creating a PROCEDURE

0

I am creating a procedure to be able to insert data into a table in the database, but it is giving an error that I can not identify:

Command:

begin
   INCLUIR_CLIENTE(1, 'SUPERMERCADO XYZ', '12345', NULL, 150000);
end;

Message submitted:

  

ORA-06550: line 2, column 1:   PLS-00905: object PLSQL_SCHEMA_CARLOS.INCLUIR_CLIENTE is invalid   ORA-06550: line 2, column 1:   PL / SQL: Statement ignored

Client Table Structure: Client Table

Procedure I'm creating:

create or replace PROCEDURE INCLUIR_CLIENTE 
   (p_id in cliente.id%type,
    p_razao_social IN cliente.razao_social%type,
    p_cnpj cliente.cnpj%type ,
    p_segmercado_id IN cliente.segmercado_id%type,
    p_faturamento_previsto IN cliente.faturamento_previsto%type)
IS
    v_categoria cliente.categoria%type;
BEGIN
    IF p_faturamento_previsto < 10000 THEN
            v_categoria := 'PEQUENO';
        ELSIF p_faturamento_previsto < 50000 THEN
            v_categoria := 'MEDIO';
        ELSIF p_faturamento_previsto < 100000 THEN 
            v_categoria := 'MEDIO GRANDE';
        ELSE
            v_categoria := 'GRANDE';
    END IF;  
    INSERT INTO cliente VALUES (p_id, UPPER(p_razao_social), p_cnpj,p_segmercado_id, SYSDATE, p_faturamente_previsao, v_categoria);
    COMMIT;
END;

The table fields are all hitting, but you're still giving this error. Can anyone help me, use the Oracle Apex platform?

    
asked by anonymous 09.02.2018 / 18:01

0 answers