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

Recommended Answers

All 3 Replies

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?

commented: disagree -3
Member Avatar

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.