Home » SQL & PL/SQL » SQL & PL/SQL » TO_NUMBER Doesn't Support These Elements: RN, rn, TM, and V ? (Oracle Database 11g, Unix)
TO_NUMBER Doesn't Support These Elements: RN, rn, TM, and V ? [message #646237] Tue, 22 December 2015 20:47 Go to next message
kittokevin
Messages: 3
Registered: December 2015
Junior Member
I've been playing with all the elements in Oracle Number Format Models and found that RN, rn, TM, and V are supported by TO_CHAR(Number), but not by TO_NUMBER. Is this right ?

I listed all the sql statements for these format elements in this post:
http://speedy-elephant.blogspot.com/2015/12/oracle-format-models-tochar-and-tonumber.html
Re: TO_NUMBER Doesn't Support These Elements: RN, rn, TM, and V ? [message #646239 is a reply to message #646237] Tue, 22 December 2015 21:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
kittokevin wrote on Tue, 22 December 2015 18:47
I've been playing with all the elements in Oracle Number Format Models and found that RN, rn, TM, and V are supported by TO_CHAR(Number), but not by TO_NUMBER. Is this right ?

I listed all the sql statements for these format elements in this post:
http://speedy-elephant.blogspot.com/2015/12/oracle-format-models-tochar-and-tonumber.html


This is comparable to use TO_DATE() on a DATE datatype.
This is comparable to use TO_CHAR() on a VARCHAR2 datatype.
It is nonsensical to use TO_NUMBER() function on any NUMBER datatype; because there is ZERO reason to convert any NUMBER TO_NUMBER()!

>Is this right ?
Yes, you are right.
Re: TO_NUMBER Doesn't Support These Elements: RN, rn, TM, and V ? [message #646240 is a reply to message #646237] Tue, 22 December 2015 21:52 Go to previous message
Solomon Yakobson
Messages: 3269
Registered: January 2010
Location: Connecticut, USA
Senior Member
Correct they are number "output" formats. And it makes sense for V and TM. But for RN Oracle could provide converting strings of roman numerals to a number.

SY.
Previous Topic: Parameterized One-Time-Only procedure....
Next Topic: Generate GUID other than sys_GUID() (merged 3)
Goto Forum:
  


Current Time: Thu Mar 28 07:27:03 CDT 2024