Q:

The multi-part identifier " " could not be bound

i have this stored procedure
Create Proc Get_Order_Production
AS

SELECT i.Name_Item
  ,[ID_Order]
  ,[Project]
  ,[Length]
  ,[Width]
  ,[Quantity]
  ,[Weight]
  ,[Supplier]
  ,[GDS_Name]
  ,[GDS_Date]
  ,[WorkshopName]
  ,[WorkshopDate]
  ,[ReservedQty]
  FROM OdredDetails od
   INNER JOIN ItemQuantity iq 
           ON iq.ID_ItemQte = od.ID_ItemQte 
   INNER JOIN item i
           ON i.ID_Item = iq.ID_Item 
   where [Order].Number_Order=od.ID_Order and [Order].[Location]='PRODUCTION'

When I execute I receive this error
Msg 4104, Level 16, State 1, Procedure Get_Order_Production, Line 23 [Batch Start Line 2]
The multi-part identifier "Order.Number_Order" could not be bound.
Msg 4104, Level 16, State 1, Procedure Get_Order_Production, Line 23 [Batch Start Line 2]
The multi-part identifier "Order.Location" could not be bound.

I try to use the original tables name and use parentheses but I failed

A:

USE Join syntax  , remove join from where clause 
       SELECT  
    --column names 
       FROM order Inner join 
       OdredDetails od on [Order].Number_Order=od.ID_Order 
        --(it is orderdetails I guess)
        INNER JOIN ItemQuantity iq 
               ON iq.ID_ItemQte = od.ID_ItemQte 
        INNER JOIN item i
               ON i.ID_Item = iq.ID_Item 
         WHERE  [Order].[Location]='PRODUCTION'

