Jonn
Jonn

Reputation: 33

Oracle SQL 11g: How do I update the column so first letter of each word is capitalized?

How do I update the column so first letter of each word is capitalized?

I tried using:

Update COUNTRIES  SET COUNTRYNAME=Upper(SUBSTR(COUNTRYNAME, 1, 1))
+SUBSTR(COUNTRYNAME, 2,LENGTH(COUNTRYNAME))

Upvotes: 0

Views: 128

Answers (1)

Zaynul Abadin Tuhin
Zaynul Abadin Tuhin

Reputation: 31993

use INITCAP()

 Update COUNTRIES  SET COUNTRYNAME=INITCAP(COUNTRYNAME)

oracle docs

Upvotes: 3

Related Questions