0

我的 SQL 查询有问题。
我想要一个多重连接,但错误没有帮助。

以下是我的查询:

SELECT bn_ms_bm_bankmaster.CMP_CUSTCODE AS Id_client
    ,BN_CS_MP_MASTERPROFILE.CMP_NAME AS Nom_prenom
    ,PR_GN_AD_ENTITYADDRESS.PMP_MUNCIPCODE
FROM bn_ms_bm_bankmaster
INNER JOIN BN_CS_MP_MASTERPROFILE ON bn_ms_bm_bankmaster.CMP_CUSTCODE = BN_CS_MP_MASTERPROFILE.CMP_CUSTCODE
INNER JOIN PR_GN_AD_ENTITYADDRESS ON bn_ms_bm_bankmaster.CMP_CUSTCODE = PR_GN_AD_ENTITYADDRESS.CMP_CUSTCODE

此查询返回给我流动的错误:

无法使用 Microsoft Query 添加表 bn_ms_bm_bankmaster

欢迎任何帮助。

4

2 回答 2

0

请试试这个。

Select A.CMP_CUSTCODE AS Id_client,
B.CMP_NAME as Nom_prenom,
C.PMP_MUNCIPCODE

FROM bn_ms_bm_bankmaster AS A

INNER JOIN BN_CS_MP_MASTERPROFILE AS B ON A.CMP_CUSTCODE= B.CMP_CUSTCODE
INNER JOIN PR_GN_AD_ENTITYADDRESS AS C ON B.CMP_CUSTCODE = C.CMP_CUSTCODE
于 2019-03-18T12:42:56.743 回答
0

你可以试试下面。

select * from(Select bn_ms_bm_bankmaster.CMP_CUSTCODE AS Id_client,BN_CS_MP_MASTERPROFILE.CMP_NAME as Nom_prenom,PR_GN_AD_ENTITYADDRESS.PMP_MUNCIPCODE FROM bn_ms_bm_bankmaster INNER JOIN BN_CS_MP_MASTERPROFILE ON bn_ms_bm_bankmaster.CMP_CUSTCODE=BN_CS_MP_MASTERPROFILE.CMP_CUSTCODEINNER JOIN PR_GN_AD_ENTITYADDRESS ON bn_ms_bm_bankmaster.CMP_CUSTCODE=PR_GN_AD_ENTITYADDRESS.CMP_CUSTCODE);
于 2019-03-18T12:46:51.327 回答