我正在尝试将Access Query迁移到SQL Server视图。我已经完成了Select部分,但是当我粘贴这个FROM和WHERE时,我得到“'='附近的语法错误”。我希望你们中的一个人能够识别出这个错误(因为我无法做到)
FROM facility
INNER JOIN ((dbo.elmscoursereportlisttableaulink
INNER JOIN dbo.userlearningneeds
ON dbo.elmscoursereportlisttableaulink.[item id] =
dbo.userlearningneeds.[item id])
INNER JOIN roster
ON dbo.userlearningneeds.[user id] =
roster.[user id])
ON facility.[abbr] = roster.[routing symbol]
WHERE ( ( ( dbo.elmscoursereportlisttableaulink.report ) = true )
AND ( ( dbo.elmscoursereportlisttableaulink.active ) = true )
AND ( (
( dbo.userlearningneeds.[revision number] =
dbo.elmscoursereportlisttableaulink.[revision number] )
OR ( ( dbo.userlearningneeds.[revision number] ) IS NULL
AND ( dbo.elmscoursereportlisttableaulink.[revision number] ) IS
NULL
)
) = true ) );
答案 0 :(得分:1)
首先格式化SQL :) http://poorsql.com/
最后一个' = True'看起来很可疑 - 尝试删除它并将其他真实的内容更改为1。