INITCAP
Converts the first letter of each word in expr to uppercase and all subsequent letters to lowercase. The delimiter for words is a single space or another non-alphanumeric character.
Syntax
sql
INITCAP(expr)Arguments
expr: The STRING value to be processed.
Return Value
The return value has the data type STRING.
Usage Instructions
The determination of the case of the initial characters is based on the binary mapping defined for the underlying character set.
Example
sql
select
initcap('lorem ipsum dolor sit amet, consetetur') as result
union all
select initcap('LOREM ipsum dolor sit amet, consetetur') as result
union all
select
initcap('LOREM
ipsum
dolor
sit
amet,
consetetur') as result
;+-----------------------------------------------------------------+
| RESULT |
+-----------------------------------------------------------------+
| Lorem Ipsum Dolor Sit Amet, Consetetur |
| Lorem Ipsum Dolor Sit Amet, Consetetur |
| Lorem Ipsum Dolor Sit Amet, Consetetur |
+-----------------------------------------------------------------+Note
Please also note that the content of the last row contains line breaks that cannot be displayed in the result window of the Metakraftwerk. Copying and pasting this cell may result in:
Lorem
Ipsum
Dolor
Sit
Amet,
Consetetur