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!

convert char to number

609621Nov 21 2007 — edited Nov 23 2007
Hai all,

I have a colmn called Kilometers in table of datatype varchar and has got morethan 20,000 numeric records in it.. only numbers are getting stored in that column.. now am creating one more table with column called kiometres with datatype number..
I want to insert the records of table A.Kilometres to B.Kilometres.. I tried the follwoing :


insert into project_mileage (kilometres) select (to_number(kilometres,'9999999')) from project

am getttin the error :

ora-01722. invalid number.

how can I get the records inserted..

Thanks
Kai
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2007
Added on Nov 21 2007
22 comments
30,232 views