這是我有它的錯誤。所以我不知道要做什麼。請幫幫我。子查詢返回的值超過1個。 SQL錯誤
子查詢返回的值超過1。當 子查詢遵循=,!=,<,< =,>,> =或當子查詢用作 表達式時,這是不允許的。
UPDATE Kho
/*SET Kho.Xuat = SUM(PhieuXuat.SL)*/
SET Kho.Xuat = (SELECT SUM(PhieuXuat.SL) AS SLuong FROM PhieuXuat group by PhieuXuat.MaVT)
FROM Kho
INNER JOIN PhieuXuat
ON (Kho.MaVT = PhieuXuat.MaVT)
非常感謝。它是很大的! –
請接受您認爲對您最有幫助的答案。 –