Iam writing (or trying to write) a simple join query statement in Query Analyzer. As of right now Im getting the error message
Ambiguous column name 'categoryID'.
My Statement is ;
Select categoryID, Max (StockPrice) as maxStockPrice, MIN(StockPrice) as minStockPrice, AVG(StockPrice) as avgStockPrice
From Category, InventoryPart
Where Category.CategoryID = InventoryPart.CategoryID;
Im thinking it has something to do with the fact that SQL isn't sure if it should pull the column categoryID from the Category Table or InventoryPart Table.
1) Am I correct in thinking the above
2) how do I fix it?
Any Help Would be Greatly Appreciated