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!

Handling comma in number format in SQL

User_H6M8AMar 21 2018 — edited Mar 22 2018

Hello,

I have a Table where the values are stored mostly numbers but one of the value has , in it.Though the field is kept as varchar2 for business purpose the number are stored in it.

I need to exposre even though the field is varchar2 and has , values in it should display in number format.

create table test_number

(

attribute2 varchar2(20));

insert into test_number values ('2,448.50');

insert into test_number values (6000.34);

commit;

select * from test_number;

pastedImage_13.png

Can the value which is represented as 2448.50 instead of 2,488.50 when we select from the table

Please need help on this

This post has been answered by John Thorton on Mar 21 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2018
Added on Mar 21 2018
7 comments
3,037 views