My Oracle Support Banner

Query Fails With ORA-00918 After Upgrade to 11g (Doc ID 835701.1)

Last updated on FEBRUARY 03, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.5 to 11.2.0.2 [Release 10.2 to 11.2]
Information in this document applies to any platform.



Symptoms

Query that worked fine in 10.2 is now failing with ORA-918 in 11g

For example:

SELECT PROJECT_ID,
       PROJ_VERSION_NO,
       NAME ,
       DESCRIPTION ,
       LAST_CHANGED_DATE
FROM   leeh.PW2_PROJECT
JOIN
  (SELECT PROJECT_ID AS MAX_ID,
          MAX(PROJ_VERSION_NO) AS MAX_VERSION
   FROM leeh.PW2_PROJECT
   GROUP BY PROJECT_ID
  ) T
ON  PROJECT_ID = MAX_ID
AND PROJ_VERSION_NO = MAX_VERSION
WHERE PROJ_VERSION_NO > 0;

ORA-00918: column ambiguously defined

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.