Register for Windows 8 Event for IT professionals

 

It gives us great pleasure to invite you to exclusive events for
IT professionals, where Microsoft Experts would take you
through the latest Technologies of Microsoft including Windows 8 & Internet Explorer 10. They will give you insights into the benefits your organization can draw from these new technologies.
LEARN ALL ABOUT:
Internet Explorer 10
Windows 8 Enterprise features
Windows Server 2012
Enabling Flexible Work style
EVENT DETAILS:
Date City Address
08th October
2012
Bangalore Le Meridien
28, Sankey Road, Bangalore
Ph : +91-80-2226 22 33/ 2228 28 28
09th October
2012
Hyderabad Katriya Hotels & Towers
Raj Bhavan Rd, Somajiguda, Hyderabad
Ph : +91-40-23325678 / 4066135678
11th October
2012
Chennai Ambassador Pallava
Montieth Road, Egmore, Chennai
AGENDA:
Time Session
1.30 pm – 2.00 pm Registration
2.00 pm – 3.15 pm Windows 8 & IE 10 in the Enterprise – Enabling Flexible Workstyles
3.15 pm – 4.30 pm Windows 8 & Windows Server 2012 – Better together
4.30 pm – 5.00 pm High-tea

Microsoft respects your privacy. Please refer to our online Privacy Statement.

Microsoft Corporation (India) Pvt. Ltd.
9th Floor, Tower A, DLF Cyber Greens, DLF Cyber Citi, Sector 25A
Gurgaon, Haryana 122 002 INDIA

Posted in Miscellaneous | Tagged , , , , | Leave a comment

Case Sensitive Search in sql query

Case Sensitive Search in sql query

Case Sensitive Query Search – SQL Server

I have got a request to write a select query to get data by matching a column with case sensitive and I should not suppose to use any conversion function.

Then I came to know that there is a way to accomplish this using “COLLATE”

There are mainly two collations in SQL Server:

COLLATE Latin1_General_CS_AS – Case Sensitive

SQL_Latin1_General_CP1_CI_AS – Not Case Sensitive – Default Collation

I’ll give you an example

 

 

-- Not Case Sensitive - 'ABC' is euuals to 'abc'

DECLARE @a VARCHAR(100)
SET @a='ABC'
  IF(@a COLLATESQL_Latin1_General_CP1_CI_AS='abc')

                        PRINT 'Strings are equal'
            ELSE
                        PRINT 'Not equal'

-- Case Sensitive - 'ABC' is not euuals to 'abc'


DECLARE @a VARCHAR(100)

SET @a='ABC'

            IF(@a COLLATELatin1_General_CS_AS ='abc')

                        PRINT 'Strings are equal'

            ELSE

                        PRINT 'Not equal'

It would be more useful in cross collated environment and also as per the performance point of view using collation while comparing boost performance when compares with convert functions in where clause.   

Posted in SQL Development | Tagged , , , , , , , , , , | Leave a comment