SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Unicode sort
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

noamg
Posting Yak Master

Israel
215 Posts

Posted - 10/30/2006 :  11:53:53  Show Profile  Reply with Quote
hi,
I run the following, but the result show char-224 before char-65 !!!

create table ling( str nvarchar(1000))

insert into ling values( N'Ann Smith')
insert into ling values( N'Anna')
insert into ling values( N'Becky')
insert into ling values( N'Clara')
insert into ling values( N'Deanna')
insert into ling values( N'#913;#961;#953;#963;#964;#959;#964;#941;#955;#951;#962;')
insert into ling values( N'#1040;#1083;#1077;#1082;#1089;#1072;#1085;#1076;#1088;#1072;')
insert into ling values( N'à#262;Æ')
insert into ling values( N'DF#282;è')
insert into ling values( N'Zxr')
insert into ling values( N'89')
insert into ling values( N'#&^')
-----------------

select * from ling
order by str asc



Noam Graizer

spirit1
Cybernetic Yak Master

Slovenia
11751 Posts

Posted - 10/30/2006 :  12:03:54  Show Profile  Visit spirit1's Homepage  Reply with Quote
this is because of collation settings
try:
create table ling( str nvarchar(1000) collate Latin1_General_BIN)

for all collations see
SELECT * FROM ::fn_helpcollations()



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp

Edited by - spirit1 on 10/30/2006 12:04:21
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30249 Posts

Posted - 10/30/2006 :  12:13:56  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Or just sort them collated when using the records in the output, as
select * from ling
order by [str] collate Latin1_General_BIN


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000