2
I cannot 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;
/
Issues that error:
Error report - ORA-06550: row 8, column 20: PLS-00103: Found the symbol "=" when one of the following symbols was expected:
precision The symbol "precision" has been replaced by "=" for carry on. 06550. 00000 - "line %s, column %s: n%s" *Cause: Usually a PL/SQL Compilation error. *Action:
Anyone can help?
Oracle does not differentiate
: =
of:=
?– Renan Gomes
Yeah, the operator is
:=
, the two symbols together. You cannot have this space between them.– Caffé
Even without the space it indicates the same error. In fact the code is without the spaces, they appeared when placing it in the post.
– let