.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

How to get only Upper characters stored data from a table using SqlServer?

Posted By:Syed Shakeer Hussain       Posted Date: August 15, 2009    Points: 10    Category: SQL Query    URL: http://www.dotnetspark.com  
 

Suppose if you want to retrive the data only whose name is in capital Letters in a table.

SELECT name FROM default_tbl WHERE name = upper(name) COLLATE Latin1_General_CS_AI

 

output:name

           AUSTIN

           SMITH

if you want to retrive the data only whose name is in lower  Letters in a table.

SELECT name FROM default_tbl WHERE name = lower(name) COLLATE Latin1_General_CS_AI

 

output:name

           shakeer

           hussain

Regards!

Syed Shakeer Hussain


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend