Friday, March 30, 2012

order by turkish character problem

i want to order by name coloumn.but if i do that ordering is (A,B,C,D,E,F......X,Y,Z,?,?,?,ü). i want to order these letters at place of turkish alphebetical order.how can i do that? i'm sorry for my english.Moving to the Transact-SQL forum from SSIS.|||

1. Check your column datatype it should be NVarchar

2. While inserting the value the string constants should be enclosed with N'....'

3. If the above 2 points are not solving your problem, then create the column with rite collate..

create table #test

(

alphas nvarchar(1) Collate Turkish_CI_AI

)

insert into #test values(N'A');

insert into #test values(N'D');

insert into #test values(N'Y');

insert into #test values(N'?');

insert into #test values(N'?');

insert into #test values(N'?');

insert into #test values(N'ü');

Select alphas from #test Order By alphas Desc

No comments:

Post a Comment