Reputation: 4202
I'm inserting string values from one table into another where the string values are in all caps.
How can I alter the case of the string on INSERT such that only the first letter of every word in the string is capitalized?
Example: 'TESTING ABC' would be inserted as 'Testing Abc'
Upvotes: 1
Views: 46
Reputation: 311958
The initcap
function should do the trick:
INSERT INTO some_table (some_column)
SELECT INITCAP(some_other_column)
FROM some_other_table
Upvotes: 1