我有一个查询在除一个以外的所有数据库中工作。并且它没有运行的数据库给出了以下错误。
[Error] Script lines: 1-7 --------------------------
Incorrect syntax near '('.
More exceptions ... Incorrect syntax near ','.
以下是查询
SELECT onecolumn, secondcolumn FROM one_table WHERE {someConditions}
AND someColumn NOT IN (select value from otherDB.dbo.functionName((select someList
from otherDB..otherDBTable where {someConditions}),','))
知道为什么会这样......真的很令人沮丧。
由于
洁
答案 0 :(得分:2)
SELECT部分中有一个逗号,它应该是这样的:
SELECT onecolumn, secondcolumn FROM one_table WHERE {someConditions}
AND someColumn NOT IN (select value from otherDB..dbo.funcitonName((select someList
from otherDB..otherDBTable where {someConditions}),','))