-2
我有這樣的JOIN:附近有語法錯誤和條款
LEFT MERGE JOIN
(SELECT
VOUCHER, TAXITEMGROUP, TAXCODE, TAXAMOUNT, TAXAMOUNTCUR, SOURCERECID, GENERALJOURNALACCOUNTENTRY
FROM
##TGJAE TT
WHERE
(TT.TAXCODE LIKE 'RISR%')) TTRISR
AND TT.POSTINGTYPE IN (14, 236, 71)
AND TT.TRANSDATE BETWEEN @FECHA_INI AND @FECHA
AND TT.TAXORIGIN = 11
AND ON C1.TT_VOUCHER = TTRISR.VOUCHER
AND C1.TT_SOURCERECID = TTRISR.SOURCERECID
AND C1.TT_TAXITEMGROUP = TTRISR.TAXITEMGROUP
AND TTRISR.GENERALJOURNALACCOUNTENTRY = PRO.TTGJAEF_GENERALJOURNALACCOUNTENTRY
但是,當我與SQL Server Management Studio中執行,我得到這個錯誤:
Incorrect syntax near the keyword 'AND'
我沒有找到我的問題AND
條款,任何人都可以解釋我的加入有什麼問題嗎?問候
(TT.TAXCODE LIKE'RISR%'))TTRISR <---該行產生錯誤 – GSazheniuk