Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345

Collation and SQL_VARIANT Expand / Collapse
Author
Message
Posted Tuesday, November 15, 2011 9:43 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 4:24 PM
Points: 27, Visits: 466
To me the answer should not depend on data type.

C - case
I - Insensitive
A - Accent
S - Sesitive

b and B cannot be Accent differentiated
b and B cannot be Case differentiated


Jason
http://dbace.us
Post #1206112
Posted Tuesday, November 15, 2011 10:27 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 10:26 AM
Points: 11,194, Visits: 11,136
jswong05 (11/15/2011)
To me the answer should not depend on data type.

C - case
I - Insensitive
A - Accent
S - Sesitive

b and B cannot be Accent differentiated
b and B cannot be Case differentiated

The point is the values in the column have different collations, and SQL Server cannot directly compare strings from different collations. For SQL_VARIANT data containing strings to compare equal, the collation must be the same first.

Not sure what you mean by 'b' AND 'B' cannot be 'case differentiated' - they have different casing!




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #1206174
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse