Oracle9i SQL Reference
Release 1 (9.0.1)

Part Number A90125-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Functions, 80 of 166


NLSSORT

Syntax

nlssort::=


Text description of functions19a.gif follows
Text description of nlssort

Purpose

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', this function uses the default sort sequence for your session. If you specify BINARY, this function returns char.


Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information. 


Example

This function can be used to specify comparisons based on a linguistic sort sequence rather than on the binary value of a string. This example assumes a test table with a name column containing two values:

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 Globalization Support Guide for information on sort sequences 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback