ORA-00918
Error: ORA-00918: column ambiguously definedCausa: A column name used in a join exists in more than one table and is thus referenced ambiguously. In a join, any column name that occurs in more than one of the tables must be prefixed by its table name when referenced. The column should be referenced as TABLE.COLUMN or TABLE_ALIAS.COLUMN. For example, if tables EMP and DEPT are being joined and both contain the column DEPTNO, then all references to DEPTNO should be prefixed with the table name, as in EMP.DEPTNO or E.DEPTNO.
Acción: Prefix references to column names that exist in multiple tables with either the table name or a table alias and a period (.), as in the examples above.
COMENTARIOS:
por vifru | 09/11/2006 14:01:23
RE: ORA-00918
Agregando alias distintos a cada campo.
por Anónimo | 08/12/2006 04:15:00
RE: ORA-00918
puedes ser mas explicito???
por Anónimo | 23/07/2007 23:03:39
RE: ORA-00918
thanks.....i undestand everything....
nowadays it's working...
Gracias....entendi el problema.
Actualmente esta trabajando mi sw.
por cobreseba | 11/11/2008 07:15:44
RE: ORA-00918
SELECT
customer_id cliecod, product_id prodcod, order_id tipocod, order_date tpocod, promotion_id promcod, sum(quantity) cantidad, max(unit_price) preciounit
FROM
oeconeccion.order_items i inner join oeconeccion.orders o on i.order_id = o.order_id
por raper_fac | 19/09/2009 15:43:17
RE: ORA-00918
select first_name,salary,department_name,manager_id
from employees e inner join departments d
on e.manager_id=d.manager_id
where salary=(select sum(salary)from employees)
ORA-00918: columna definida de forma ambigua
como ago para quitar ese error
tengo un problema ke dice
Muestre los datos de todos los departamentos, incluyendo el nombre del administrador y cuanto es lo que se gasta por pago de salarios en cada departamento.
EMPLOYEE_ID
FIRST_NAME
LAST_NAME
EMAIL
PHONE_NUMBER
HIRE_DATE
JOB_ID
SALARY
COMMISSION_PCT
MANAGER_ID
DEPARTMENT_ID
---------------------------------------------
DEPARTMENT_ID
DEPARTMENT_NAME
MANAGER_ID
LOCATION_ID
esas son las tablas,
alguien me puede ayudar con ese error


