Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 1186

A collation is a set of rules that determine how data is sorted and compared for comparing characters in a character set.

7 votes
Accepted

Installed SQL Server 2000 with wrong collation.. how to correct for entire server instance?

Quite honestly, I think your easiest approach will be: backup your user databases uninstall SQL Server reinstall SQL Server with the right collation restore your databases fix the collation on the user …
Aaron Bertrand's user avatar
4 votes
Accepted

Using collate: When to use and when not to use

You don't have any control over the collation of your customer's columns or databases, or the server collation. … So really the only ways to resolve the conflict are to: use a method that doesn't hard-code a specific collation (like DATABASE_DEFAULT) hard-code some specific, compatible collation on both sides …
Aaron Bertrand's user avatar
4 votes
Accepted

Collation by row, not by column

Collation applies to the column, database, or instance. Within a query, it is possible that you could apply different collation rules, e.g. for comparisons, using a CASE expression. … SELECT pk FROM dbo.basetable WHERE CASE WHEN collation = 1 THEN name COLLATE Albanian_BIN WHEN collation = 2 THEN name COLLATE Chinese_Taiwan_Bopomofo_90_BIN2 WHEN collation
Aaron Bertrand's user avatar
17 votes
Accepted

What's up with the collation of some columns in sys.databases?

This is irrespective of instance/database collation. … The columns are collated to proper collation at the time of installation of SQL Server in case of instance collation & at the time of creation of database in case of database collation. …
Aaron Bertrand's user avatar
5 votes

Is there a collation to sort the following strings in the following order 1,2,3,6,10,10A,10B...

If you want a painful way to prove what @gbn is saying (essentially that you can't tell a collation to order substrings differently), you can make a quick #temp table that has a coefficient for the order … you expect, and see if ordering by any collation returns the same order: CREATE TABLE #foo(id INT, n NVARCHAR(10)); CREATE TABLE #bar(collation SYSNAME); SET NOCOUNT ON; INSERT #foo SELECT 1,'1' UNION …
Aaron Bertrand's user avatar