ORA-00976 in sql v.11 "order siblings by LAST_NAME" but its OK in sql v.9
[mila@oas mila]$ sqlplus hr/hr@ageSQL*Plus: Release 9.0.1.4.0 - Production on Gio Set 20 10:08:16 2012
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> select lpad(' ',(level-1)*3)||LAST_NAME LAST_NAME
from hr.employees
start with manager_id is null
connect by prior EMPLOYEE_ID=manager_id
order siblings by LAST_NAME; 2 3 4 5
LAST_NAME
--------------------------------------------------------------------------------
King
Cambrault
Bates
Bloom
Fox
Kumar
Ozer
Smith
De Haan
Hunold
Austin
.......
[oracle@dbase2 logs]$ sqlplus hr/hr@age2
SQL*Plus: Release 11.2.0.3.0 Production on Gio Set 20 10:11:37 2012
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> select lpad(' ',(level-1)*3)||LAST_NAME LAST_NAME
from hr.employees
start with manager_id is null
connect by prior EMPLOYEE_ID=manager_id
order siblings by LAST_NAME; 2 3 4 5
LAST_NAME
--------------------------------------------------------------------------------
King
Cambrault
Bates
Bloom
Fox
Kumar
Ozer
Smith
De Haan
Hunold
Austin
.......
[oracle@dbase2 logs]$ sqlplus hr/hr@age2
SQL*Plus: Release 11.2.0.3.0 Production on Gio Set 20 10:11:37 2012
0