Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select not case sensitive
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01545328
Message ID:
01545390
Views:
30
>Even though he's only the second best hockey player ever ;-) Just kidding. The Great One and The Chosen One, as they were dubbed, were both off this planet. They saw things happening on the ice before anyone else saw them as even possibilities. They were playing a completely different game from everyone else.
>
>I am perfectly comfortable considering Gretzky and Orr the two best ever. Those discussions have always mystified me. Who's better, Russell or Chamberlain? Who's better, Mantle or Mays? It's just silly. They were all great.

I can go with that.

Except Orr was better.... ;)

>
>>>Excellent advice, sir.
>>>
>>>Lately I have been working with JavaScript, which is case sensitive, and quickly learned to go with rigorous case sensitive code.
>>>
>>>Can you believe the Stanley Cup is all but over? Kudos to the L.A. Kings for getting red hot at the right time. Who would have thunk it?
>>
>>I'm not a Kings fan, but I despise New Jersey (the Devils and the State in general). I'm absolutely thrilled to see the Kings kicking their @sses. I wasn't going to bother watching the series, but after LA came out swinging I've been watching every minute.
>>
>>Nice to see The Great One in attendence too.
>>
>>
>>>
>>>
>>>>>>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.
>>>>
>>>>And then design your app to completely ignore case. If you are searching text, use case insensitive collation or UPPER() or LOWER() to make sure of it.
>>>>
>>>>>
>>>>>>>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,
>>>>>>>>
>>>>>>>>
>>>>>>>>-- Both statements below find the record.
>>>>>>>>select * from MyTable where EmailAddr = 'FirstName@gmail.com'
>>>>>>>>select * from MyTable where EmailAddr = 'fIrstNamE@GMAIL.com'
>>>>>>>>-- on so on. All find the record
>>>>>>>>
>>>>>>>>
>>>>>>>>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.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform