Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle19c,The NLS_SORT parameter cannot affect the DISTINCT in the Analytic Function Clauses.

Yang YuMar 10 2025

This is the description of the document:

Here's my setup:

ALTER SESSION SET NLS_COMP = 'BINARY'; 
ALTER SESSION SET NLS_SORT = 'BINARY_CI';

Therefore, according to the description in the documentation, the operation of the DISTINCT depends on the result of NLS_SORT.

But here are my test results.

select ID, 
NAME, 
NLSSORT(NAME), 
count(DISTINCT NAME) over () 
from (select ID, NAME from T200_12_FRENCH where NAME = 'E' or NAME = 'É' or NAME = 'e' or NAME = 'é');

results:

I understand that the result of the count function should be the result of NLSSORT(NAME) deduplication: 2. However, the execution result is 4.

Comments
Post Details
Added on Mar 10 2025
2 comments
83 views