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!

TO_NUMBER ISSUE

ThompsonJun 10 2010 — edited Jun 15 2010
Hi, I am trying to format a number from a view but it isn't working. Any help is appreciated.

desc C_AMG

Name Null? Type
----------------------------------------- -------- -------------------------


GI50 VARCHAR2(40)

This works and returns data. However I would like the number formatted and it isn't by default:
CREATE or REPLACE FORCE VIEW test_view_jj AS SELECT
(TO_NUMBER(E.GI50)) GI50
from C_AMG E;

So I tried to format it:

CREATE or REPLACE FORCE VIEW test_view_jj AS SELECT
(TO_NUMBER(E.GI50, 999999999.99)) GI50
from C_AMG E;

select gi50 from c_amg_view_to_number
*
ERROR at line 1:
ORA-01722: invalid number
This post has been answered by Frank Kulash on Jun 15 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2010
Added on Jun 10 2010
9 comments
4,895 views