Skip to main content

INITCAP

Functions › Text › Case and length

Returns a string with the first letter of each word in upper case and the other letters in lower case.

Syntax​

INITCAP( <string> )

Arguments​

ArgumentDescription
<string>The text to convert.

Returns​

Text. NULL when <string> is NULL.

Usage notes​

  • A word is a run of letters and digits. Any other character, such as a space, hyphen or apostrophe, starts a new word: INITCAP('o''neil-SMITH') is O'Neil-Smith.
  • A digit counts as part of a word, so the letter after it stays lower case: INITCAP('3RD AVENUE') is 3rd Avenue.
  • It always runs after the rows are read, never in the data store.

Examples​

SELECT c.key, INITCAP(c.name) AS name
FROM Customer c
keyname
C-104Ana Ruiz
C-310Mary-Jane O'Neil

See also​

UPPER · LOWER