我这里有这个代码:
Dim sql, sqlD, sqlE, sqlA As String
Dim rsA As ADODB.Recordset
Set rsA = New ADODB.Recordset
sqlA = "SELECT * From A INNER JOIN (SELECT B.Role From B LEFT JOIN C ON
(B.Role=C.Role) WHERE (C.Role IS NULL and mid(B.Role,1,2)='ZE' and
mid(B.Role,6,1)='_')) ON (A.Role=B.Role)"
rsA.Open sqlA, conn, adOpenStatic
所以,我的输入数据由3个表组成: B表:包含所有角色 A和C表:两个表都有B表中角色的进一步信息
我的代码所做的是,内部选择拉出B表减去C表中的值,然后在B表中保留任何内容,它与A表进行内连接。
但我收到的错误是:
JOIN操作中的语法错误。
请帮忙