i want to ask you when i execute the following sql statement
SELECT account_identifier,least(to_number(part_1)),least (to_number(part_2)) FROM TEST5 ;

i get the following error

ORA-01722: invalid number
01722. 00000 - "invalid number"

you should know that when i execute the following sql statement
SELECT account_identifier,to_number(part_1),to_number(part_2) FROM TEST5 ;

it works fine

5 Years
Discussion Span
Last Post by lena1990

If my cursory google glance has served me well, least requires more than 1 input to function properly...

Is your result returning multiple rows? If not, least may not be what you are looking for, but floor() maybe?

Votes + Comments

I would be more inclined to think the statement is expecting a number

ORA-01722: The preceding ORA would throw a spanner in the works causing the query to fail.
You can't do maths on a string with alpha numeric characters on it.


now i tried the following and i get the same error
SELECT account_identifier,to_number(part_2) FROM TEST5 ;
i write the following query to see if it has a character
select * from test5 where not regexp_like(part2,'[[:digit:]]');
and i get zero records

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.