2

当我尝试运行此查询时,它给了我错误“此子查询最多可以返回一条记录”

SELECT * from rosterTbl 
WHERE 
rosterTbl.CounsellorID IN (IIF (ISNULL([Forms]![ReportsGUI]![cmbCounsellor]) , (SELECT counsellorID FROM
[Main: Counsellors_Tbl]),[Forms]![ReportsGUI]![cmbCounsellor]))
4

1 回答 1

2

对于您要完成的工作,您的查询应如下所示:

SELECT * from rosterTbl 
WHERE [Forms]![ReportsGUI]![cmbCounsellor] IS NULL
OR rosterTbl.CounsellorID 
IN (SELECT counsellorID FROM [Main: Counsellors_Tbl])
于 2013-10-30T22:39:32.217 回答