我查看了有关此主题的几篇帖子,但无法解决此错误。我已经链接了我试图包含在 SQL 2008 中的 WHERE 子句中的服务器。我能够在没有 WHERE 子句的情况下成功执行查询。我确定我忽略了一些东西,只是需要一些建议。多部分标识符的消息位于 WHERE 子句中的这一行。
LAWNURSEDB.NGDemo.dbo.EXPORT_DIRECTTIME.SocialSecurityNumber
SELECT dbo.VP_PUNCHORIGIN.PERSONNUM, EXPORT_DIRECTTIME_1.SocialSecurityNumber, dbo.VP_PUNCHORIGIN.PERSONFULLNAME
FROM dbo.VP_PUNCHORIGIN INNER JOIN
LAWNURSEDB.NGDemo.dbo.EXPORT_DIRECTTIME AS EXPORT_DIRECTTIME_1 ON
dbo.VP_PUNCHORIGIN.PERSONNUM = EXPORT_DIRECTTIME_1.SocialSecurityNumber
WHERE (dbo.VP_PUNCHORIGIN.PERSONNUM NOT IN
(SELECT LAWNURSEDB.NGDemo.dbo.EXPORT_DIRECTTIME.SocialSecurityNumber AS Expr1
FROM LAWNURSEDB.NGDemo.dbo.EXPORT_DIRECTTIME AS EXPORT_DIRECTTIME_1))