Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Query to convert lowercase to uppercase characters in SQL Server

Jul 8, 2012
Introduction:

In this article I will explain how to write a query to convert or change lowercase to uppercase or uppercase to lowercase characters in SQL server.

Description:

In previous post I explained how to alter or modify or delete or change already existing column in datatable in SQL Server and many articles relating to SQL Server. Now I will explain how to convert or change lowercase to uppercase or lowercase to uppercase characters in SQL Server. Here I will explain with one example for that I have one table UserDetails like as shown below

Syntax to convert uppercase characters

If we want to convert characters to uppercase that syntax will be like this


SELECT UPPER(ColumnName) FROM TableName
Ex:


SELECT UPPER(UserName) as UserName, UPPER(FirstName) as FirstName, UPPER(LastName) as LastName FROM UserDetails
OutPut

Syntax to convert Lowercase characters

If we want to convert characters to lowercase that syntax will be like this


SELECT LOWER(ColumnName) FROM TableName
Ex:


SELECT LOWER(UserName) as UserName, LOWER(FirstName) as FirstName, LOWER(LastName) as LastName FROM UserDetails
OutPut


If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

6 comments :

Unknown said...

Hi
Suresh
The Query is good,where we use this type of query in real time applications,will you please explain with a example.


Thanks&Regards
Hareesh.A

Unknown said...

nhjh

Unknown said...

how to view the word file in asp.net using sql

Unknown said...

Dear sir Suresh if we run this query it convert the coumn lower as well as upper.but when i use the SELECT*FROM "Tablename".the table have same reults as before...........................

so what it' use

r.k saini

Anonymous said...

rajneesh saini

when u write the query select upper(columnname) from table name that means it will show you only in uppercase but in the table the value could not be changed...

Anonymous said...

Hi! Here's my dilemma. How can I write a carrier name "EMPLOYERS" to output "Employers"?
I really don't need to lowercase the entire "EMPLOYERS" string. Can you please help? Thanks!

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.