![]() The example shows the output in a session in which the session parameter NLS_TERRITORY is set to AMERICA. See Table 2-15 for a complete listing of number format elements. In the optional number format fmt, L designates local currency symbol and MI designates a trailing minus sign. In the next example, the output is blank padded to the left of the currency symbol. The following statement uses implicit conversion to combine a string and a number into a number: SELECT TO_CHAR('01110' + 1) FROM DUAL Ĭompare this example with the first example for TO_CHAR (character). If you omit 'nlsparam' or any one of the parameters, then this function uses the default parameter values for your session. Ten characters are available for the currency symbol. Within the quoted string, you must use two single quotation marks around the parameter values. They must be different single-byte characters. The characters d and g represent the decimal character and group separator, respectively. This argument can have this form: 'NLS_NUMERIC_CHARACTERS = '' dg'' The 'nlsparam' argument specifies these characters that are returned by number format elements: Refer to " Format Models" for information on number formats. If n is negative, then the sign is applied after the format is applied. If you omit fmt, then n is converted to a VARCHAR2 value exactly long enough to hold its significant digits. ![]() The value n can be of type NUMBER, BINARY_FLOAT, or BINARY_DOUBLE. TO_CHAR (number) converts n to a value of VARCHAR2 data type, using the optional number format fmt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |