I keep getting this ORA-00918: column ambiguously defined error and i don't know what i'm doing wrong. Any help would be appreciated Here is my code:
select CUSTOMER.CUS_CODE as CUS_CODE,
CUSTOMER.CUS_AREACODE as CUS_AREACODE,
INVOICE.INV_NUMBER as INV_NUMBER,
SUM(LINE.LINE_UNITS*LINE.LINE_PRICE) as Amount
from LINE LINE,
INVOICE INVOICE,
CUSTOMER CUSTOMER
where CUSTOMER.CUS_CODE=INVOICE.CUS_CODE
and INVOICE.INV_NUMBER=LINE.INV_NUMBER
group by CUS_AREACODE, CUS_CODE
JOINsyntax. Also, I'm not sure what the question is. There are exactly two unqualified column references in the query, so the answer looks obvious to me. - Gordon LinoffCUS_CODE. When you sayorder by CUS_CODE, which table'sCUS_CODEdo you mean? - mustacciogroup by CUS_AREACODE, CUSTOMER.CUS_CODEit still gives me that error - Rene D. BalliCUS_CODE, but all columns. - Prisoner