what does the meaning of following error

ORA-00918: column ambiguously defined


As a rule of thumb, always use the notation {Entity}.[Attribute] for all your attributes in a SQL query. This prevents errors like you're having, and allows the Platform to generate the proper SQL to send to the database.

Of course, even better is to use Aggregates if at all possible!

Hello Lovish,

I would follow Killian advice to use aggregates whenever possible.

If you can't, follow his advice on using the proper syntax.

But I think the error can also rise if the database engine can't define which column you are referencing when using subqueries that use again an entity that is being used outside the subquery. In this case you need to use alias for the entity, to explicitly tell the engine to which column you are referencing.

Can you provide your query so we can advise you better on the possibility of making it an aggregate or hoe to fix it?


Eduardo Jauch