LEFT JOIN SQL 不支持连接表达式
LEFT JOIN SQL Join Expression not supported
我找不到这个 SQL 表达式有什么问题:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (PNLTERM LEFT JOIN TERMS ON PNLTERM.LINKTERM = TERMS.LINKTERM)
INNER JOIN WIREFRM2 ON TERMS.HDL = WIREFRM2.COMP_HDL;
与PNLTERM/TERMS上的left join有关;因为它适用于内部连接和右连接,但不适用于左连接。
错误是 'Join expression not supported'.
有什么想法吗?
MS Access 有一些关于使用 LEFT/RIGHT 连接和 INNER 连接的规则。具体来说,有一个关于它的组合的规则。解释 here:
A LEFT JOIN or a RIGHT JOIN may be nested inside an INNER JOIN, but an INNER JOIN may not be nested inside a LEFT JOIN or a RIGHT JOIN.
您有几个选择:您可以将第二个联接转换为左联接:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (PNLTERM LEFT JOIN TERMS ON PNLTERM.LINKTERM = TERMS.LINKTERM)
LEFT JOIN WIREFRM2 ON TERMS.HDL = WIREFRM2.COMP_HDL;
或者,您可以更改查询,以便 INNER 联接在前:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (WIREFRM2 INNER JOIN TERMS ON TERMS.HDL = WIREFRM2.COMP_HDL)
RIGHT JOIN PNLTERM ON PNLTERM.LINKTERM = TERMS.LINKTERM;
我找不到这个 SQL 表达式有什么问题:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (PNLTERM LEFT JOIN TERMS ON PNLTERM.LINKTERM = TERMS.LINKTERM)
INNER JOIN WIREFRM2 ON TERMS.HDL = WIREFRM2.COMP_HDL;
与PNLTERM/TERMS上的left join有关;因为它适用于内部连接和右连接,但不适用于左连接。 错误是 'Join expression not supported'.
有什么想法吗?
MS Access 有一些关于使用 LEFT/RIGHT 连接和 INNER 连接的规则。具体来说,有一个关于它的组合的规则。解释 here:
A LEFT JOIN or a RIGHT JOIN may be nested inside an INNER JOIN, but an INNER JOIN may not be nested inside a LEFT JOIN or a RIGHT JOIN.
您有几个选择:您可以将第二个联接转换为左联接:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (PNLTERM LEFT JOIN TERMS ON PNLTERM.LINKTERM = TERMS.LINKTERM)
LEFT JOIN WIREFRM2 ON TERMS.HDL = WIREFRM2.COMP_HDL;
或者,您可以更改查询,以便 INNER 联接在前:
SELECT DISTINCT PNLTERM.TAGSTRIP, TERMS.TERM, PNLTERM.STRIPSEQ, TERMS.WIRENO,
TERMS.REF, TERMS.MFG, TERMS.CAT, TERMS.BLOCK, PNLTERM.HDL, TERMS.WDBLKNAM,
TERMS.JUMPER_ID, WIREFRM2.WIRELAY
FROM (WIREFRM2 INNER JOIN TERMS ON TERMS.HDL = WIREFRM2.COMP_HDL)
RIGHT JOIN PNLTERM ON PNLTERM.LINKTERM = TERMS.LINKTERM;