這個SQL語句總是說SELECT附近錯誤?是不是SUM函裡面不嵌套SELECT語句?
SELECT B002, SUM
(SELECT [B005] FROM
(SELECT * FROM TAICON_TB INNER JOIN
TAICON_TA INNER JOIN
INPUT_B INNER JOIN
INPUT_A ON INPUT_B.B001 = INPUT_A.A001 AND
INPUT_B.B006 = INPUT_A.A012 ON
TAICON_TA.TA001 = INPUT_B.B002 ON
TAICON_TB.TB002 = TAICON_TA.TA006
WHERE (TAICON_TB.TB003 = '5 ') AND (INPUT_A.A002 = '1 ')
AND (INPUT_A.A014 = '[3]207來料待處理品倉 '))
WHERE A008 LIKE '2007.1.% ') AS 本月結存,
SUM
(SELECT [B005] FROM
(SELECT * FROM TAICON_TB INNER JOIN
&n