CapFirstLetters

CapFirstLetters capitalizes the first letter of each word found in a given input string.

Syntax

CapFirstLetters(<input_string>[, <delimiter_string>])

Input_string is the source string to capitalize.

Delimiter_string is optional and defines the character(s) that delimit words found in input_string. Default value is a single space.

Return Type

String

Details

The function is useful to clean source data. For example, a source data file might have people’s names in all lowercase. Use CapFirstLetters to convert ‘john l connor’ to ‘John L Connor’.

Examples

select CapFirstLetters('do re mi fa so la ti do') as CapFirstLetters,
'do re mi fa so la ti do' as orig
from Empty();

select CapFirstLetters('do@@re@@mi@@fa@@so@@la@@ti@@do', '@') as CapFirstLetters,
'do@@re@@mi@@fa@@so@@la@@ti@@do' as orig
from Empty();

Related Functions

Refer to various string functions