Help me understand sorting

  • From: "William Wagman" <wjwagman@xxxxxxxxxxx>
  • To: "Oracle Freelists.org" <Oracle-L@xxxxxxxxxxxxx>
  • Date: Thu, 18 Jan 2007 13:16:02 -0800

Greetings,

I am hoping someone can help me understand how NLS_SORT influences
sorting or point me at documentation which will explain things. I don't
understand it. Here is the scenario...

SQL> show parameter nls_sort   
NAME                                 TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
nls_sort                             string
GENERIC_BASELETTER

A select statement appears to ignore case...

SQL> select * from dba_roles where role = 'connect';
ROLE                           PASSWORD
------------------------------ --------
CONNECT                        NO

Now if I set NLS_SORT=binary...

SQL> alter session set nls_sort=binary;
Session altered.
SQL> select * from dba_roles where role = 'connect';
no rows selected

I must explicitly specify case...

SQL> select * from dba_roles where role = 'CONNECT';
ROLE                           PASSWORD
------------------------------ --------
CONNECT                        NO

nls_language = AMERICAN

Where can I find an explanation of what is going on here?

Thanks.

Bill Wagman
Univ. of California at Davis
IET Campus Data Center
wjwagman@xxxxxxxxxxx
(530) 754-6208
--
//www.freelists.org/webpage/oracle-l


Other related posts: