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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access