Monday, March 19, 2012

COLLATE Problem

Hi

Currently i am using the "Latin1_General_CS_AI" Collate

I just need the name of Collate which make my DB as Case sensitive Search but not the object name(or column name of table) sensitive

Like (if my table name is "misc",

all

Select * from misc

Select * from Misc

Select * from MIsc

Select * from MISc

Select * from MISC

should work.

Just as the Oracel does.

I try all the collates, but nothing give both.

Help me?

Regards,

Thanks.

Gurpreet S. Gill

object name collation is defined/controlled by the database collation. If you create your database with Latin1_General_CS_AI then your object names will follow case-sensitive collation.

So, server's collation defines the sort order for server's objects (i.e. logins, database names, object names in the master db, etc.) and is the default collation for database's objects if you do not explicitly define it at the database creation.

Database's collation defines the default sort order for objects within it (i.e. table, view, sproc, udf name, etc.).

Object's collation defines the sort order for the actual data for that specific object/column.

Long story short, if you run the following query and it returns Latin1_General_CS_AI then your table name is case-sensitive.

select databasepropertyex('your_db','collation')|||

oj--

i know all these things but i want the collate who`s

search should be case-sensitive & not the object name(or column name of table) sensitive.

Regards,

Thanks

Gurpreet S. Gill

No comments:

Post a Comment