Use Table Calculations to Capitalize First Letter of String (INITCAP)

Knowledge Drop

Last tested: Dec 13, 2019
 

Most SQL Dialects have a function like INITCAP() that automatically capitalizes the first character of a string. See:

https://docs.aws.amazon.com/redshift/latest/dg/r_INITCAP.html
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions065.htm

We can do this using Table Calcs with an example like:

 

concat(upper(substring(${Dimension},1,1)),substring(${Dimension},2,length(${Dimension})))

We use concat to combine to substring functions.

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 12:45 PM
Updated by: