0
這是我簡單的sql代碼。當在執行它的拋出和錯誤。SQL多部分標識符錯誤
無法綁定多部分標識符「product_hscodes.hscode」。
select DISTINCT mi.*,csq.contract_code
from master_items mi
join contract_shipment_qty csq on csq.item_code = mi.code
join contract c on c.code = csq.contract_code
join master_item_products mp on mp.master_item = mi.id
join hscode h on h.code = product_hscodes.hscode
where csq.shipment_id = 6
and csq.contract_code = '046V-12-A04-05'
and mi.code = 'M165'
and h.code = '12345'
我想你忘了加入'product_hscodes'表。 –
不,我試過了。如果我添加到「從」其拋出「mi.code」,也沒有發現 – Mifas
,那麼你爲什麼加入這個'h.code = product_hscodes.hscode'加入hscode h? –