Archive

Archive for February, 2013

Convert DateTime to Date MS SQL

February 15, 2013 Leave a comment

select convert(varchar, getdate(), 105)

This convert datetime to date using sql query.

For detail refer

http://www.mssqltips.com/sqlservertip/1145/date-and-time-conversions-using-sql-server/

http://www.sql-server-helper.com/tips/date-formats.aspx

Categories: MS SQL Tags:

Case Sensitive WHERE Condition MS SQL Server

February 13, 2013 1 comment

I can see the WHERE condition checks the condition case insensitively. Here is the sql query that checks the username case sensitively in SQL Server.

SELECT * FROM [User] WHERE Username = ‘Sree’ Collate SQL_Latin1_General_CP1_CS_AS

For more info refer

http://www.mssqltips.com/sqlservertip/1032/case-sensitive-search-on-a-case-insensitive-sql-server/