Ora-01722: Invalid Number, ora-01722 Invalid Number
One of the reasons for this error:
The types of fields associated with table A and table B are inconsistent, for example:
The aid in Table A is the primary key, the bid in Table B is the aid foreign key, the aid uses the INT type, and the bid uses the Varchar type.
(1) If the join operation is correct when the two tables are not empty, oracle can automatically perform type conversion.
(2) If the two tables are empty, join will show "ora-01722: Invalid Number"
Oracle ORA-01722 Invalid Number
Select * from user
Where
INSTR (select ',' | field | ',' from table_a where id = 1), ',' | TRIM (TO_CHAR (user_id) | ', ')> 0
Oracle Database Query, always reported error ORA-01722: Invalid Number
You can see that billion should have non-numeric content.
Convert to character for comparison
Select * from A, B where to_char (A. CourseNum) = B. billon;