I want to know what is the equivalent for 'InitCap' in Oracle to SQL Server without creating an additional function like 'dbo.initcap()'. Can anyone help me how to get this without using a function.
Asked
Active
Viewed 4,062 times
0
-
Possible duplicate: [How to update data as upper case first letter with t-sql command?](http://stackoverflow.com/questions/11688182/how-to-update-data-as-upper-case-first-letter-with-t-sql-command) – Pred Sep 24 '14 at 09:16
1 Answers
-2
You can try it with something like
concat(ucase(substr(yourstring, 1,1)), substr(yourstring, 2))

Leo Chapiro
- 13,678
- 8
- 61
- 92
-
The above code capitalizes only the first character of the string. Oracle's InitCap capitalizes the first letter of **EACH** word. – vchan Jan 15 '20 at 15:35
-
concat(upper(substring ('yourstring', 1,1)), lower(substring('yourstring', 2,len('yourstring')))) – Dandy Jul 22 '21 at 07:26