Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: to_number question
Wednesday, July 14, 2004, 7:56:06 PM, Stephen.Lee_at_DTAG.Com (Stephen.Lee_at_DTAG.Com) wrote:
SLDC> But if I try something like SLDC> select yadayada from table where 123 < {any of the above number SLDC> conversions)
SLDC> I get ORA-01722: invalid number
Almost certainly somewhere in your column you have at least one value that fails to convert to a number. Offhand, one way that comes to mind to find that one value is to write a loop inside a PL/SQL block that goes through your table row-by-row doing the TO_NUMBER conversion. Wrap that conversion in its own block, with an exception handler, and you should be able to trap on the specific row having the non-numeric value.
Best regards,
Jonathan Gennick --- Brighten the corner where you are http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com
Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://five.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body.
![]() |
![]() |