вот так не работает
with t as (
select 1 as id, RPAD('Я',999,'Я') as col from dual
union all
select 2 as id, RPAD('Я',999,'Я') as col from dual
union all
select 3 as id, RPAD('Я',999,'Я') || RPAD('Э',100,'Э') as col from dual
)
select
DENSE_RANK () OVER ( ORDER BY NLSSORT(col,'NLS_SORT = BINARY') ) as rank_str
,length(col) as len
,id, col
from t
order by id
;
а так работает
with t as (
select 1 as id, RPAD('Я',1000,'Я') as col from dual
union all
select 2 as id, RPAD('Я',1000,'Я') as col from dual
union all
select 3 as id, RPAD('Я',1000,'Я') || RPAD('Э',100,'Э') as col from dual
)
select
DENSE_RANK () OVER ( ORDER BY NLSSORT(col,'NLS_SORT = BINARY') ) as rank_str
,length(col) as len
,id, col
from t
order by id
;
кто-нибудь может объяснить?