Re: ORA-00960 "Ambiguous column..."

From: troy trimble <troyt_at_csdc02.orl.mmc.com>
Date: 1996/01/26
Message-ID: <4eb5su$rft_at_theopolis.orl.mmc.com>#1/1


In article Iq9_at_liverpool.ac.uk, qq45_at_liverpool.ac.uk (Ms. D.H. Harvey) writes:
>deangup_at_admin.ci.seattle.wa.us wrote:
>: A user is getting ORA-00960 in MS ACCESS 2.0 running on WINDOWS 3.1 attaching to tables in
>: ORACLE 7.0.15 running on AIX. Text of message: "Ambiguous column naming in select list." I can't find
>: the message in ORACLE7 SERVER MESSAGES AND CODES MANUAL (3605-70-1292); going by
>: message numbers I expected it on page 2-54. (Maybe somebody with a later version of Oracle will have it
>: in their manual?) The columns in the user's ACCESS SQL statement appear to be fully qualified. Thanks
>: for any information about this error!
>
>00960, 00000, "ambiguous column naming in select list"
>// *Cause: A column name in the order-by list matches more than one select
>// list columns.
>// *Action: Remove duplicate column naming in select list.
>
>Hope this helps.
>
> Helen

This also occurs when you have a column name without an alias in the select list and two or more tables in the FROM clause have that same column name. The best way to avoid this problem is to always use aliases in queries. This also has the benefit of self-documenting what tables the select list items are being derived from.

Later,
TT Received on Fri Jan 26 1996 - 00:00:00 CET

Original text of this message