我做了以下查询:
SELECT [tbl_Imp_tabel WBS WPE.Verantwrd], [tbl_Imp_tabel WBS WPE.WBS_Id], [tbl_Imp_tabel WBS WPE.Koptekst], [tbl_Users.UserName], [tbl_Users.WPENaam]
FROM [tbl_Imp_tabel WBS WPE]
INNER JOIN [tbl_Users]
ON tbl_Imp_tabel WBS WPE.Verantwrd = tbl_Users.WPENaam ;
然而,我的访问告诉我,我在线上缺少一个操作员:
ON tbl_Imp_tabel WBS WPE.Verantwrd = tbl_Users.WPENaam ;
知道如何解决这个问题吗?
提前致谢
答案 0 :(得分:1)
ON 子句中的表名周围有错过的方括号
试试这个
SELECT [tbl_Imp_tabel WBS WPE].[Verantwrd], [tbl_Imp_tabel WBS WPE].[WBS_Id], [tbl_Imp_tabel WBS WPE].[Koptekst], [tbl_Users.UserName], [tbl_Users.WPENaam]
FROM [tbl_Imp_tabel WBS WPE]
INNER JOIN [tbl_Users]
ON [tbl_Imp_tabel WBS WPE].[Verantwrd] = tbl_Users.WPENaam ;
答案 1 :(得分:1)
您已在ON子句中忘记了表名 [tbl_Imp_tabel WBS WPE.Verantwrd] 周围的方括号。 Usage of [ ] in SQL
SELECT [tbl_Imp_tabel WBS WPE.Verantwrd], [tbl_Imp_tabel WBS WPE.WBS_Id], [tbl_Imp_tabel WBS WPE.Koptekst], [tbl_Users.UserName], [tbl_Users.WPENaam]
FROM [tbl_Imp_tabel WBS WPE]
INNER JOIN [tbl_Users]
ON [tbl_Imp_tabel WBS WPE.Verantwrd] = tbl_Users.WPENaam ;