SSMS 设计器删除方括号

SSMS 设计器删除方括号

我正在设计一个访问链接服务器中的表的视图。

每次我将此查询粘贴到 SQL 窗格中时,Intellisense 都会删除方括号,然后抱怨前缀超过 3 个。我尝试关闭 Intellisense,但这种情况一直发生:

SELECT   Loc.Address1, Loc.Address2, Loc.Address3, BP.BusinessPartnerName
FROM     [REPORTING.SOMESERVER.CA].Toast.dbo.BusinessPartnerLocations AS Loc LEFT OUTER JOIN
         [REPORTING.SOMESERVER.CA].Toast.dbo.BusinessPartner AS BP ON Loc.BusinessPartnerID = BP.BusinessPartnerID

更改为:

SELECT   Loc.Address1, Loc.Address2, Loc.Address3, BP.BusinessPartnerName
FROM     REPORTING.SOMESERVER.CA.Toast.dbo.BusinessPartnerLocations AS Loc LEFT OUTER JOIN
         REPORTING.SOMESERVER.CA.Toast.dbo.BusinessPartner AS BP ON Loc.BusinessPartnerID = BP.BusinessPartnerID

错误信息

答案1

似乎将服务器名称括在引号中会导致 Intellisense 忽略它。

FROM        ["REPORTING.SOMESERVER.CA"].Toast.dbo.BusinessPartnerLocations AS Loc LEFT OUTER JOIN

相关内容