This is a migrated thread and some comments may be shown as answers.

Invalid column name "NAME"

0 Answers 136 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 03 Jun 2010, 06:19 PM

I'm going the Telerik Reporting learning guide. On page 55, step #9, the following query is referenced:

SELECT top 20  
Production.Product.NAME,  
Production.WorkOrder.StockedQty,  
Production.WorkOrder.ScrappedQty,  
Production.WorkOrder.OrderQty  
FROM 
Production.Product  
INNER JOIN 
Production.WorkOrder ON Production.Product.ProductID = Production.WorkOrder.ProductID  
WHERE Production.WorkOrder.ScrappedQty > 0 

However when I execute that query, I'm getting the following error:

Invalid column name 'NAME'

I think it has something to do with the fact that there's a user-defined data type by the same name in the AdventureWorks database. What's the solution?

Thanks!

Duh...
I realized that the AdventureWorks database is case sensitive, the first column in the select list should've been "Production.Product.Name"

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 1
Share this question
or