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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

to_number

user10274093Apr 19 2015 — edited Apr 19 2015

Hi all,

I have the following :

select TO_NUMBER(MYSTRING ) FROM(

select to_char(sysdate - (sysdate-14.5232)) as MYSTRING from DUAL)

TO_NUMBER(MYSTRING)

-------------------

         14,5231944

But I want to have only :

TO_NUMBER(MYSTRING)

-------------------

         14,52

Then :

select TO_NUMBER(MYSTRING , '99.99') FROM(

select to_char(sysdate - (sysdate-14.5232)) as MYSTRING from DUAL)

01722. 00000 -  "invalid number"

What's wrong ?

Thank you.

This post has been answered by BrunoVroman on Apr 19 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2015
Added on Apr 19 2015
3 comments
934 views