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 varchar2 datatype to number data type

849776Jun 14 2011 — edited Jun 14 2011
how to convert varchar2 data type to number datatype.


my data looks like

create table a(
col1 varchar2(50)
col2 varchar2(500);

insert into a (col1,col2) values ('1234','2345');

select cast(to_number(col1) as number(19)) column1 from a;

iam getting invalid number error


i need to create a table with same columns with data types as number(19)

can any one help me

Thanks,
This post has been answered by 730428 on Jun 14 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2011
Added on Jun 14 2011
7 comments
1,132 views