Andy Jarrett
Andy Jarrett

Reputation: 873

SQL Server 2008 collation

I am moving a table from MySQL to SQL Server 2008 which holds a mixture of characters in one e.g. english, Français, Ελλάδα

When I do this I either get the Greek character represented by ????? or I loose the French/Spanish accents?

I have set my columns up as nvarchar for unicode and played around with the collations but I cannot seem to figure this one out.

Upvotes: 0

Views: 1102

Answers (3)

Andy Jarrett
Andy Jarrett

Reputation: 873

It turns out my problem was with the actuall insert script I was running. You using NVarchar field you need add an "N" to the insert. i.e. myColumn = N'Ελλάδα'.

Upvotes: 2

You should ensure that MySQL characters are correctly converted to ucs-2 (unicode) used by SQL Server from whatever collation/encoding you have in MySQL (probably, utf-8?)

See. for ex., Insert UTF8 data into a SQL Server 2008

Upvotes: 0

Kalle
Kalle

Reputation: 2293

What SQL Commands are you using??

When inserting into MS SQL you need to use the COLLATE keyword for each column that has a special collation.

Upvotes: 1

Related Questions