I need a SQL query to make all data in a column UPPER CASE?
Any ideas?
UPPER() : This function in SQL Server helps to convert all the letters of the given string to Uppercase. If the given string contains special characters or numeric values, then they will remain unchanged by this function.
SQL was developed in the 1970s when the popular programming languages (like COBOL) used ALL CAPS, and the convention must have stuck. Show activity on this post. It's because that is the way it is defined in the ANSI standard.
How to Convert Uppercase to Lowercase in SQL Server – LOWER() In SQL Server, you can convert any uppercase string to lowercase by using the LOWER() function. Simply provide the string as an argument when you call the function, and it will be returned in lowercase form.
Case insensitive SQL SELECT: Use upper or lower functionsselect * from users where lower(first_name) = 'fred'; As you can see, the pattern is to make the field you're searching into uppercase or lowercase, and then make your search string also be uppercase or lowercase to match the SQL function you've used.
Permanent:
UPDATE MyTable SET MyColumn = UPPER(MyColumn)
Temporary:
SELECT UPPER(MyColumn) AS MyColumn FROM MyTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With