title image


Smiley Re: Oracle 9.2: Sortierung PHP-Skript vs. Tora
Hi,

irgendetwas in deinerm PHP Programm setzt den Parameter NLS_SORT auf einen länderspezifischen Wert:



dimitri@VDB> create table sort (c varchar2(1));

Table created.

dimitri@VDB> insert into sort values('A');

1 row created.

dimitri@VDB> insert into sort values('B');

1 row created.

dimitri@VDB> insert into sort values('C');

1 row created.

dimitri@VDB> insert into sort values('1');

1 row created.

dimitri@VDB> insert into sort values('2');

1 row created.

dimitri@VDB> insert into sort values('3');

1 row created.

dimitri@VDB> commit;

Commit complete.



Und nun:



dimitri@VDB> alter session set nls_sort=binary; --Normalerweise Standard



Session altered.



dimitri@VDB> select * from sort order by c;



C

-

1

2

3

A

B

C



6 rows selected.



dimitri@VDB> alter session set nls_sort=GERMAN; --Jetzt länderspezifisch sortieren



Session altered.



dimitri@VDB> select * from sort order by c asc;



C

-

A

B

C

1

2

3



6 rows selected.





Dim



Zitat Tom Kyte:
I have a simple philosophy when it comes to the Oracle Database: you can treat it as a black box and just stick data into it, or you can understand how it works and exploit it as a powerful computing environment.

OTN's "Greatest Hits" CD

SQL-Tips.de Das SQL-Wiki


geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: