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!

Number Format Error

473990Jul 11 2007 — edited Jul 11 2007
I have a string that is expressed like exemple '1.000,00'. I want to convert to a number to store it in database, the number field in the table have the pressission with 2 decimal. I have tried to use like this to convert to number, but raise an error.
SELECT TO_NUMBER(TO_CHAR('1.0000', '99G999G990D99')) FROM DUAL
but it cannot convert to number, when I use TO_CHAR with this maskare, it can be stored.
SELECT TO_CHAR('10000', '99G999G990D99') FROM DUAL
How can I convert the string '1.000,00' to number with 2 decimals in the table, some tips?

Thanks all!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2007
Added on Jul 11 2007
7 comments
881 views