NLS_INITCAP function v17
NLS_INITCAP
returns <outputstring> TEXT
, with first letter of each word in uppercase and rest of the letters to lowercase.
NLS_INITCAP(<inputstring> TEXT [, <'nlsparam'> TEXT])
Where,
inputstring
is of the TEXT data type.
nlsparam
is of the TEXT data type. You can provide nlsparam
in the format 'NLS_SORT=value'
. For example 'NLS_SORT=xdanish'
where xdanish
is treated as the NLS parameter in the NLS config file and according to which the linguistic requirements for case conversion is handled.
The <outputstring>
is of the TEXT data type. The return string is in the same character set as inputstring
.
Examples
This example shows NLS_INITCAP function with default mapping of NLS parameter.
SELECT NLS_INITCAP('ijsland', 'NLS_SORT = XDUTCH');
nls_initcap ------------- Ijsland (1 row)
This example shows how to add a new mapping of NLS parameter and a collation value in the NLS config file using edb_nls_cf_insert
function.
SELECT edb_nls_cf_insert('xdutch', '"pg_catalog"."nl-NL-x-icu"');
edb_nls_cf_insert ------------------- (1 row)
This example shows NLS_INITCAP function after adding a new mapping to the NLS config file.
SELECT NLS_INITCAP('ijsland', 'NLS_SORT = XDUTCH');
nls_initcap ------------- IJsland (1 row)
This example shows NLS_INITCAP function for simple input string.
SELECT NLS_INITCAP('abcDef pQr', 'NLS_SORT = XTURKISH');
nls_initcap ------------- Abcdef Pqr (1 row)
- On this page
- Examples