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
 which collation to use ? ...

Author  Topic 

fabianus76
Posting Yak Master

191 Posts

Posted - 2008-12-11 : 10:50:53
Hello all !

I would like to know which collation to use in order to make diffrence between :

test
Test
Tëst
Tèst


I want all of these to be diffrent, just like in a string test in VB.NET (or C#).

For now I use Latin1_General_CI_AI, but this makes that there is no diffrence between

test
tëst

And that's not what I want ...

Thanks a lot for any help !

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-12-11 : 11:10:27
Latin1_General_CS_AS will do the job

DECLARE @strings TABLE (
[colA] NVARCHAR(50)
, [colB] NVARCHAR(50)
)

INSERT @strings
SELECT 'test', 'test'
UNION ALL SELECT 'test', 'Test'
UNION ALL SELECT 'test', 'Tëst'
UNION ALL SELECT 'test', 'Tèst'

SELECT *
FROM
@strings a
WHERE
[colB] <> a.[colA] COLLATE LATIN1_GENERAL_CS_AS

SELECT *
FROM
@strings a
WHERE
[colB] = a.[colA] COLLATE LATIN1_GENERAL_CS_AS


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2008-12-11 : 14:30:00
Dear Charlie,

thanks a lot for your feedback !

Could you please explain for want stands CS, AS, AI, KS etc. ?
I can not find any reference on this :-(

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-11 : 14:38:02
quote:
Originally posted by fabianus76



Could you please explain for want stands CS, AS, AI, KS etc. ?
I can not find any reference on this :-(

Regards,
Fabianus

my favorit hoster is ASPnix : www.aspnix.com !



Case Sensitive,Accent Sensitive,Kana Sensitive.
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2008-12-11 : 18:56:01
Hi sodeep,

thanks a lot for your help !

Regards,
Fabainus

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-12-12 : 04:32:44
And obviously CI, AI, Ki, etc are IN-SENSITIVE


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

fabianus76
Posting Yak Master

191 Posts

Posted - 2008-12-12 : 16:50:34
Got it Charlie !

Thanks again and see you !

Fabianus

my favorit hoster is ASPnix : www.aspnix.com !
Go to Top of Page
   

- Advertisement -