Database Administration (MOSC)

MOSC Banner

To_CHAR ora-01722

edited Apr 30, 2013 6:44AM in Database Administration (MOSC) 15 commentsAnswered ✓
What is causing  ora-01722 for some rows in thable
Select c1 ,cc2 ,to_char(c2) from users.table where c1=12000;

Name                                                  Null?    Type
----------------------------------------------------- -------- ------------------------------------
C1                                              NOT NULL NUMBER(10)
C2                                           NUMBER(14)

and if
select to_char(C2) from users.table

it stops when the column when
c1=12000

TO_CHAR(CODBRRUNDVNDFRN)
----------------------------------------
6893084006296
5893284015838
9893284015883
4893284025431

ERROR:
ORA-01722: invalid number


when
A new table table_new is created  as original and insert line by line into a new table and rename it with original name and  i can use function to_char in this column.  table  is the original table renamed.

1)  when I tried to copy data with insert with a subquery ( insert into user.table_new select * from users.table ) the problem  occurred in the new table

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center