-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edited as per the review comments from Nishant for NLS config file an…
…d NLS_Upper function. Added NLS_LOWER and NLS_INITCAP.
- Loading branch information
1 parent
a8e7e95
commit 4888018
Showing
4 changed files
with
247 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 64 additions & 1 deletion
65
...eference/sql_reference/03_functions_and_operators/nls_functions/nls_initcap.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,66 @@ | ||
--- | ||
title: "NLS_INITCAP function" | ||
--- | ||
--- | ||
|
||
`NLS_INITCAP` returns `<outputstring> TEXT`, with all letters in uppercase. | ||
|
||
|
||
```sql | ||
NLS_INITCAP(<inputstring> TEXT [, <'nlsparam'> TEXT]) | ||
``` | ||
|
||
Where, | ||
|
||
`inputstring` is of the TEXT data type. | ||
|
||
`nlsparam` is of the TEXT data type. | ||
|
||
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 and a collation value. | ||
|
||
```sql | ||
SELECT NLS_INITCAP('Gloße', 'NLS_SORT = xdanish'); | ||
__OUTPUT__ | ||
NLS_INITCAP | ||
----------- | ||
GLOßE | ||
(1 row) | ||
``` | ||
|
||
|
||
This example shows how to add a new entry of NLS parameter and a collation value in the NLS config file using `edb_nls_cf_insert` function. | ||
|
||
```sql | ||
SELECT edb_nls_cf_insert('xdanish', '"pg_catalog"."da-x-icu"'); | ||
__OUTPUT__ | ||
edb_nls_cf_insert | ||
------------------- | ||
|
||
(1 row) | ||
``` | ||
|
||
|
||
This example shows NLS_INITCAP function after adding a new entry to the NLS config file. | ||
|
||
```sql | ||
SELECT NLS_INITCAP('Gloße', 'NLS_SORT = xdanish'); | ||
__OUTPUT__ | ||
NLS_INITCAP | ||
----------- | ||
GLOSSE | ||
(1 row) | ||
``` | ||
|
||
|
||
This example shows NLS_INITCAP function for simple input string. | ||
|
||
```sql | ||
SELECT NLS_INITCAP('abcDef', 'NLS_SORT = XGERMAN'); | ||
NLS_INITCAP | ||
----------- | ||
Abacdef | ||
(1 row) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.