Home » SQL & PL/SQL » SQL & PL/SQL » ora-00918 column ambiguously defined
ora-00918 column ambiguously defined [message #10357] Fri, 16 January 2004 22:35 Go to next message
Teny Yu
Messages: 6
Registered: September 2002
Junior Member
i have one program developed by Delphi 5.0

when this program run in win98:

somthing is error:

ora-00918 column ambiguously defined.

 

but it is okey in win2000
Re: ora-00918 column ambiguously defined [message #10360 is a reply to message #10357] Sat, 17 January 2004 06:34 Go to previous message
Art Metzer
Messages: 2
Registered: January 2004
Junior Member
If the developers were to always use table aliases (qualified identifiers) in their SQL, then this issue blissfully goes away:
SQL> SELECT deptno
  2  FROM   emp
  3  ,      dept
  4  WHERE  ROWNUM = 1
  5  /
SELECT deptno
       *
ERROR at line 1:
ORA-00918: column ambiguously defined
 
 
SQL> SELECT <font color=red>e</font>.deptno
  2  FROM   emp          <font color=red>e</font>
  3  ,      dept         <font color=red>d</font>
  4  WHERE  ROWNUM = 1
  5  /
 
    DEPTNO
----------
        20
 
SQL>
I'm a bit surprised by the fact that you aren't experiencing the ORA-00918 in Win2K. Are you certain the same SQL is being executed in each case? You might want to do a tkprof on Win98's offending SQL in Win2K to help you diagnose if/why it works over there.

Hope this helps,

Art.
Previous Topic: A bit complex sql - please help
Next Topic: converting number of seconds to date and time
Goto Forum:
  


Current Time: Fri Apr 26 09:00:58 CDT 2024