quinta-feira, 14 de agosto de 2014

NLS_SORT Oracle

Versão em Português

Today I had problems to order uppercase and lowercase letters in the Oracle database.

Running the following command solved the problem:
ALTER SESSION SET NLS_SORT = WEST_EUROPEAN;

This problem occurred in the client environment but not locally because the NLS_SORT parameter was setted to "BINARY" (responsible for sorting [AZ to az]), and what we needed it to be the "WEST_EUROPEAN" [Aa to Zz] standard.

The trigger below changes the value of the NLS_SORT parameter whenever a session starts in the schema. Do not forget to change the schema name.

create or replace trigger PARAM_SESSION_TRIG
after logon
on NomeDoSchema.schema
begin
execute immediate 'ALTER SESSION SET NLS_SORT=WEST_EUROPEAN';
end;

Kind regards!
Adrian Schmidt

Nenhum comentário:

Postar um comentário