I think I have the wrong collation set on a database I restored to a different server.
Somehow the data in a varbinary field (it's used to store a date) is being returned incorrectly.
Here's what I mean:
In the query analyzer the data shows up as:
0xDD3FC20120A42 A94000000000000 0000
However with the following select statement:
Instead of getting
<DD><3F><C2><01 ><20><A4><2A><9 4>
I get this mess
<A6><3F><2D><01><20><F1><2A><F6>
I think it has something to do with an incorrect collation setting because every character in the extended ASCII range (>7F) is returned translated. All of the characters in the lower ASCII range (01 to 7F) are returned properly.
The current Collation name is: SQL_Latin1_Gene ral_CP850_CI_AS
I think I need something that is designed for UTF8 - but I'm not sure...
If I do need to change the collation - how do I do that? I can't find a setting to change it.
Somehow the data in a varbinary field (it's used to store a date) is being returned incorrectly.
Here's what I mean:
In the query analyzer the data shows up as:
0xDD3FC20120A42 A94000000000000 0000
However with the following select statement:
Code:
select convert(char(8), itemdate) as mydate from item_data where itemid=12345678
<DD><3F><C2><01 ><20><A4><2A><9 4>
I get this mess
<A6><3F><2D><01><20><F1><2A><F6>
I think it has something to do with an incorrect collation setting because every character in the extended ASCII range (>7F) is returned translated. All of the characters in the lower ASCII range (01 to 7F) are returned properly.
The current Collation name is: SQL_Latin1_Gene ral_CP850_CI_AS
I think I need something that is designed for UTF8 - but I'm not sure...
If I do need to change the collation - how do I do that? I can't find a setting to change it.
Comment