ORA-01722: invalid number

ORA-01722: invalid number

Oracle PL/SQL error message: ORA-01722: invalid number.

Cause:

You tried to insert a string to a numeric column or to assign a string to a numeric variable.

Solution:

Check and change the input you want to insert or assign.

Example:

CREATE TABLE TEST2
   (TEST_ID NUMBER NOT NULL ENABLE, 
	TEST_NAME VARCHAR2(5) NOT NULL ENABLE
   );
   
INSERT INTO TEST2(TEST_ID, TEST_NAME) VALUES ('test id', 'test');   

Output:

SQL Error: ORA-01722: invalid number

Correct:

INSERT INTO TEST2(TEST_ID, TEST_NAME) VALUES (1, 'test');

Output:

1 rows inserted.