SQL Language (MOSC)

MOSC Banner

ORA-00976 in sql v.11 "order siblings by LAST_NAME" but its OK in sql v.9

edited Sep 20, 2012 1:51AM in SQL Language (MOSC) 2 commentsAnswered
[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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center