>This, that even the column names have to be matching in case, concerns me. I can deal with the values to be compared (by using UPPER()) but making sure that column names in my code match the names in tables will be a challenge.
>I hope more SQL Servers do not have case sensitive set ON.
>
It is quite rare to have Case Sensitive installation of SQL Server. Usually if the SQL Server was installed with the wrong collation, the best course of action is to re-install the SQL Server.
>>Be very careful with case sensitive database settings. It affects EVERYTHING. So a field called FirstName MUST always be FirstName (firstname) is not equivalent.
>>
>>>Hi,
>>>
>>>I have been doing some tests in a stored procedure and noticed that the SQL Select is not case sensitive. For example,
>>>
>>>
>>>
>>>select * from MyTable where EmailAddr = 'FirstName@gmail.com'
>>>select * from MyTable where EmailAddr = 'fIrstNamE@GMAIL.com'
>>>
>>>
>>>
>>>My understanding is that this is defined by a global setting in SQL Server and this is what it is probably set in my copy of SQL Server. My question, when writing code for my SPs, should I rely on the fact that most SQL servers will be ok with not using case sensitive syntax? Or would it be wiser, to account for case in SQL Select statements? TIA.
If it's not broken, fix it until it is.
My Blog