Ora-01722: Invalid Number, ora-01722 Invalid Number

Source: Internet
Author: User

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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.