Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01722: invalid number

554271Apr 16 2008 — edited Apr 17 2008

Hello All,
I am trying to run the following query:

select budget,
sum(to_number(beg_bal,'999,999,999.99')),
sum(to_number(month1,'999,999,999.99')),
sum(to_number(month2,'999,999,999.99')),
sum(to_number(month3,'999,999,999.99')),
sum(to_number(month4,'999,999,999.99')),
sum(to_number(month5,'999,999,999.99')),
sum(to_number(month6,'999,999,999.99')),
sum(to_number(month7,'999,999,999.99')),
sum(to_number(month8,'999,999,999.99')),
sum(to_number(month9,'999,999,999.99')),
sum(to_number(month10,'999,999,999.99')),
sum(to_number(month11,'999,999,999.99')),
sum(to_number(month12,'999,999,999.99')),
sum(to_number(end_bal,'999,999,999.99'))
from ct_mods.gl_actuals_1990_99
group by budget
order by budget

I am getting the ORA-01722: invalid number. The error seems to be in the "end_bal" column( in the above query if I comment out the end_bal statement, it works fine).

How do I find that one problem record in the "end_bal" column? ( I have close to about a million records in that table....I still need to load close to another half a million rows into it)

Thanks,
Chiru

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2008
Added on Apr 16 2008
5 comments
1,624 views