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!

Insert varchar value from one table as number to another

bentonAug 4 2011 — edited Aug 30 2011
Oracle 10g

Hi
I have a table I created by importing from an excel spread sheet. I want to insert columns from this table into other oracle tables. All the columns from the spread sheet varchar.

Is it possible to insert the varchar values from the source table and convert the values to numbers as they are inserted?

This is what I have tried so far without any success;
INSERT INTO new_table (column_1) SELECT TO_NUMBER(COL1)  FROM import_data;
Thank You
Ben
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2011
Added on Aug 4 2011
4 comments
727 views