尝试将数据输入Access。当我选择数据源作为“ SQL”以根据选定的输入进行过滤时,它给我一个错误:syntax error missing operator
SELECT
CASE
Me.Regmen = '*First Line *' THEN tblFirstLine.ID, tblFirstLine.FixedDose
ELSE tblSecondLine.ID, tblSecondLine.[Fixed Dose]
END
FROM tblFirstLine, tblSecondLine;`
答案 0 :(得分:0)
在关键字“ CASE”之后,您需要关键字“ WHEN”,如下所示:
SELECT
CASE WHEN
Me.Regmen = '*First Line *' THEN tblFirstLine.ID, tblFirstLine.FixedDose
ELSE tblSecondLine.ID, tblSecondLine.[Fixed Dose]
END
FROM tblFirstLine, tblSecondLine;