Column ambiguously defined and Master detail
Posted: Wed 17 Feb 2010 13:55
I occasionally encounter an Ora-00918 error "column ambiguously defined" when using master detail queries. I have read a similar post from 2007, but it does not seem to be the same problem.
If I join two tables on the detail level, sometimes it works fine, fx. to use a simplified version:
However sometimes I get the ambiguous error, and my guess is that when the tables joined in the query have columns with the same name, even though qualified, this error occurs, for example if in my query the table names has a field called month.
[/quote]
If I join two tables on the detail level, sometimes it works fine, fx. to use a simplified version:
works fine.select d.year, d.month, n.name
from dates d, names n
where date = :date
and d.date = n.date
However sometimes I get the ambiguous error, and my guess is that when the tables joined in the query have columns with the same name, even though qualified, this error occurs, for example if in my query the table names has a field called month.
[/quote]