What does each name look like in title case?
Tableau
PROPER([Name])SQL (DuckDB)
SELECT
array_to_string(list_transform(RANGE (1, length(Name) + 1), i - > CASE WHEN i = 1 OR NOT regexp_matches(substr(Name, i - 1, 1), '[\pL\pN]') THEN upper(substr(Name, i, 1)) ELSE lower(substr(Name, i, 1)) END), '') AS result
FROM input
ORDER BY idbob ray becomes Bob Ray; the hyphen and apostrophe in row 6 start new words.
| Name | Result |
|---|---|
| Ann Lee | Ann Lee |
| bob ray | Bob Ray |
| Café Nord | Café Nord |
| east | East |
| East | East |
| mary-jo o'neil | Mary-Jo O'Neil |
| null |
The Tableau formula and the SQL return the same 7 rows.