Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-02 |
|
|
View PDF |
nlssort::=
NLSSORT
returns the string of bytes used to sort char
.
Both char
and 'nlsparam'
can be any of the datatypes CHAR
, VARCHAR2
, NCHAR
, or NVARCHAR2
. The string returned is of RAW
datatype.
The value of 'nlsparams'
can have the form
'NLS_SORT = sort'
where sort
is a linguistic sort sequence or BINARY
. If you omit 'nlsparams'
, then this function uses the default sort sequence for your session. If you specify BINARY
, then this function returns char
.
Note: This function does not support |
This function can be used to specify comparisons based on a linguistic sort sequence rather than on the binary value of a string. The following example creates a test table containing two values and shows how the values returned can be ordered by the NLSSORT
function:
CREATE TABLE test (name VARCHAR2(15)); INSERT INTO test VALUES ('Gaardiner'); INSERT INTO test VALUES ('Gaberd'); SELECT * FROM test ORDER BY name; NAME --------------- Gaardiner Gaberd SELECT * FROM test ORDER BY NLSSORT(name, 'NLS_SORT = XDanish'); NAME --------------- Gaberd Gaardiner
See Also:
Oracle9i Database Globalization Support Guide for information on sort sequences |