Chapter 33

To_Format

Anunaya Shrivastava

Many of us have wondered why we cannot have a format function to format the alphanumeric character data on the lines of the DATATYPE conversion functions such as TO_DATE, TO_NUMBER, and TO_CHAR. These independent conversion functions are excellent instruments in datatype conversions as well as data formatting. However, the implicit premise with these conversion functions is that you are trying to convert the datatype of given data. For example, if we want to convert a number 99 into a format of 99.00, we can use the TO_CHAR function viz. TO_CHAR(99,’99.99’) to yield a 99.00 as the data value. However, in the event of this use of the TO_CHAR function, the format mask supplied is “hard-coded.” So, if ...

Get Oracle Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.