to_number question 2004-07-14 - By Jonathan Gennick
Wednesday, July 14, 2004, 7:56:06 PM, Stephen.Lee@(protected) (Stephen.Lee@(protected)) 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 (See ORA-01722.ora-code.com): 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@(protected)
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@(protected) and
include the word "subscribe " in either the subject or body.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe ' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
|
|