ORACLE - Conversion Functions: TO_NUMBER
The TO_NUMBER function converts a text into a number.
The syntax is:
TO_NUMBER (string1, [format_mask], [nls_language])
string1 is a text that will want to be converted into numbers.
format_mask is optional. This is the format that will be used to convert string1 in number
nls_language is optional. This is the language used to convert string1 in number.
Example:
TO_NUMBER ('981 .53 '9999.99') returns the number
981.53 TO_NUMBER ('225 ', '999') will return the number 225
TO_NUMBER ('23 ', '99') will return the number 23
Both the format and language are optional, so you can turn text into a simple number, eg
TO_NUMBER ('1210 .73 '') Would return the number 1210.73
0 comments:
Post a Comment