Proof of concept, change column and table names to meet your needs:create table #z (name varchar(20))insert #z select 'ABC' union allselect 'BCD' union allselect 'CDE' union allselect 'EFG' union allselect 'FGH' union allselect 'GHI' union allselect 'HIJ';with n(n) as (select 1 union all select n+1 from n where n<26), -- generate numbers for loop below-- use numbers to extract each character from the stringb(b,c) as (select substring('CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH',n,1) b, n c from n) select z.name from #z z inner join b b on substring(z.name,1,1)=b.b -- join the first character to its sort order order by b.c, z.nameedit: added comments