SQL Server: Make all UPPER case to Proper Case/Title Case

This function: “Proper Cases” all “UPPER CASE” words that are delimited by white space leaves “lower case words” alone works properly even for non-English alphabets is portable in that it does not use fancy features of recent SQL server versions can be easily changed to use NCHAR and NVARCHAR for unicode support,as well as any … Read more

Replace a Regex capture group with uppercase in Javascript

You can pass a function to replace. var r = a.replace(/(f)/, function(v) { return v.toUpperCase(); }); Explanation a.replace( /(f)/, “$1”.toUpperCase()) In this example you pass a string to the replace function. Since you are using the special replace syntax ($N grabs the Nth capture) you are simply giving the same value. The toUpperCase is actually … Read more

Upper vs Lower Case

Converting to either upper case or lower case in order to do case-insensitive comparisons is incorrect due to “interesting” features of some cultures, particularly Turkey. Instead, use a StringComparer with the appropriate options. MSDN has some great guidelines on string handling. You might also want to check that your code passes the Turkey test. EDIT: … Read more

Convert an entire range to uppercase without looping through all the cells

Is there a method I can use to convert the whole range in one line? Yes you can convert without looping. Try this Sub Sample() [A1:A20] = [INDEX(UPPER(A1:A20),)] End Sub Alternatively, using a variable range, try this: Sub Sample() Dim rng As Range Set rng = Range(“A1:A20”) rng = Evaluate(“index(upper(” & rng.Address & “),)”) End … Read more