-1
SELECT itemID AS broID,
ittCode AS broField1,
ittDescr AS broField2,
itemCode AS broField3,
itemDesc AS broField4,
Qty AS broField5
FROM tblItem
INNER JOIN tblItemType ON (tblItem.itemiitID = tblItemType.ittID AND tblItem.itemProduct = true)
LEFT JOIN
(SELECT whiitemID,
Sum(whiQty) AS Qty
FROM tblWarehouseItem AS WI
INNER JOIN tblWarehouse AS W ON WI.whiwrhID = W.wrhID
WHERE w.wrhTemp = False
AND W.wrhActive = True
AND w.wrhLock = False
GROUP BY whiitemID) AS WItem ON tblItem.itemID = WItem.whiitemID
ORDER BY ittCode, itemCode
當我嘗試運行它我得到一個語法錯誤,如果你請幫我 語法錯誤在查詢
如果我拆分我的查詢並單獨運行它們,它們工作正常。 – emilios
那不是這樣的感謝 – emilios
你能寫你在stirng中創建sql的方式嗎? @emilios –