I want to change underscore-separated strings:
my_underscore_separated_string
into CamelCase:
MyUnderscoreSeparatedString
With an SQL statement. What is the best way to do this conversion (in a table in Oracle)?
I can match the underscores with REGEXP_REPLACE, but there's no way to change the case of a backreference. INSTR/SUBSTR manipulation will only allow me to convert one underscore at a time.
How to use SQL (In Oracle) to convert underscore delimited words to camel case:
Replace all the underscores with spaces.
Use This function against the String: INITCAP(string)
Then replace all spaces with blankstring.
You should be able to do this in one line. SQL is not optimized for these sorts of string manipulation tasks so if you do a lot of these, expect it to take way too long.