Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Make database case sensitive

Author  Topic 

shanmugaraj
Posting Yak Master

219 Posts

Posted - 2007-04-25 : 03:40:55
How can I make my existing database case sensitive.
How to make SQL Queries also case sensitive from Application

ie:while running from VB,

Should work
rs.open"Select * from Employees"

Should Not work
rs.open"Select * from employees"
error should come as invalid table name.

Kristen
Test

22859 Posts

Posted - 2007-04-25 : 03:57:11
Are you REALLY sure you want to do this? All the case-sensitive DBs I've worked on have been a right PITA!

You can force the data within a specific [string/text] column (or indeed all columns) to be case sensitive by using a Binary collation. But I think having the Column names themselves being case sensitive is a PITA ... Ah, I see I already said that!

See also: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Making%20Upper,Lower%20Case%20Sensitive%20comparison

Kristen
Go to Top of Page

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-04-25 : 03:57:48
I dont know why you want to make the database case sensitive...pls give your exact requirement to do this.

It will create so many problems.. you mean to say that you want to create table like Employee, employee, EMPLoyee...it wont make any sense
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-25 : 03:58:56
Pardon my ignorance. What is PITA ?. Google tell me it is a kind of bread


KH

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-25 : 04:01:26
never mind. Found what is PITA.


KH

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-25 : 05:40:36
Hope you didn't find the "Portuguese slang" version
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-04-25 : 10:15:06
The ONLY reason I run a case-sensitive server on my devbox at home is because I have some customers that do. That way I am guaranteed that any script I write will not fail when run on one of their servers (well, it won't fail for reasons of case-sensitivity anyway...)

The downside to this is that often, scripts I try to run from this site and others - they don't work because "MyTable" is spelled one way in one part of the script, and as "mytable" in another.

it's definitely a PITA.

OTOH, when I first discovered that T-SQL was case-insensitive by default, it was a great turn-off for me, coming from the world of C++. It reminded me of VB, yuck! I am used to it now though.


www.elsasoft.org
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-25 : 10:20:45
All the while we developed on case-sensitive database. We make it a point to do this. As if it works on case-sensitive database, it will definitely work on case-insensitive database



KH

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-04-25 : 10:43:51
http://weblogs.sqlteam.com/mladenp/archive/2006/12/07/44176.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -