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
 Case Sensitive

Author  Topic 

shanmugaraj
Posting Yak Master

219 Posts

Posted - 2007-04-24 : 07:30:17
Hi,
I am using SQL Server 2000.
How to make case sensitive of a database.

Eg :
Should work
Select * from Employees
Select * from Employees where Title like 'S%'

Should not work
select * from employees
select * from employees where title like 's%'

Thanks in advance.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-24 : 07:34:01
You can try to make the column TITLE of a case sensitive collation,


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-24 : 07:47:01
Or if it is just for query purpose use COLLATE clause with Binary collation:

Select * 
from Employees
where Title Collate Latin1_General_BIN like 'S%'


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-24 : 07:48:28
Do you want to make table names and column names to be case-sensitive? not the data in it?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-24 : 09:37:16
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Making%20Upper,Lower%20Case%20Sensitive%20comparison

Kristen
Go to Top of Page

shanmugaraj
Posting Yak Master

219 Posts

Posted - 2007-04-24 : 23:54:14
Dear Friends,

My question is ,
while running from VB,

Should work
rs.open"Select * from Employees"

Should Not work
rs.open"Select * from employees"
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-04-25 : 01:50:17
this will be the behavior if the server or database has a case-sensitive collation.


www.elsasoft.org
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-25 : 03:58:43
New topic started: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82619
Go to Top of Page
   

- Advertisement -