Oracle error PLS-00103 when doing INSERT

2

I can not understand this Oracle syntax error:

SET SERVEROUTPUT ON

DECLARE

v_idEmp INTEGER: = &numero_funcionario;
v_nome VARCHAR(30): = '&nome';
v_sobrenome VARCHAR(30): = '&sobrenome';
v_email VARCHAR(30): = '&email';
v_tel VARCHAR(15): = '&tel';
v_idCargo VARCHAR: = '&idCargo';
v_salario DOUBLE: = &salario;
v_comissao NUMBER(2): = 200;
v_managerId INTEGER: = &managerId;
v_deptoId INTEGER: = &deptoId;

BEGIN

INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
VALUES(v_idEmp, 'v_nome', 'v_sobrenome', 'v_email', 'v_tel', sysdate, 'v_idCargo', v_salario, v_comissao, v_managerId, v_deptoId);


END;
/

Issue this error:

  

Error Reporting - ORA-06550: Line 8, Column 20: PLS-00103:   The symbol "=" was found when one of the following symbols was   expected:

     

precision The "precision" symbol has been replaced by "=" to   Continue.      06550. 00000 - "line% s, column% s: \ n% s" * Cause: Usually a PL / SQL compilation error. * Action:

Can anyone help?

    
asked by anonymous 11.05.2015 / 21:14

1 answer

2

I think I have too many quotes ....

follows the proposed solution, I could not test yet

SET SERVEROUTPUT ON

DECLARE

v_idEmp INTEGER := &numero_funcionario;
v_nome VARCHAR(30) := &nome;
v_sobrenome VARCHAR(30) := &sobrenome;
v_email VARCHAR(30) := &email;
v_tel VARCHAR(15) := &tel;
v_idCargo VARCHAR := &idCargo;
v_salario DOUBLE := &salario;
v_comissao NUMBER(2) := 200;
v_managerId INTEGER := &managerId;
v_deptoId INTEGER := &deptoId;

BEGIN

INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
VALUES(v_idEmp, v_nome, v_sobrenome, v_email, v_tel, sysdate, v_idCargo, v_salario, v_comissao, v_managerId, v_deptoId);


END;
/
    
11.05.2015 / 22:14