Skip to content
Advertisement

Invalid Number ORA-01722

I have problem in my query that I always get this kind of error

Whatever I try to doesn’t work. The query is here

Since here StartDate and EndDate are VARCHAR2 I need to convert to_date but I have no idea what is wrong that I always get error. The format which I store date is 'YYYY-MM-DD' Where I made mistake ? What is wrong here ?

Advertisement

Answer

Responsible_person_id VARCHAR and Delivery_contact also VARCHAR

Then compare them with strings, not with numbers.

If you compare them to numbers, Oracle tries to convert the column values to a number and the error indicates that not all values in at least one of those columns are proper numbers.

If they are supposed to contain numbers, they should be defined with the NUMBER type.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement