美好的一天,
我收到错误(&#34的查询表达式中的语法错误缺少运算符;以及monitorNumber = Monit)
SQLDel = "DELETE FROM HBAU WHERE Peoplesoft ID ='" & PSID & "' and DATE =#" & InputDate & "# and MonitorNumber = Monit"
任何人都可以告诉我什么失踪......
答案 0 :(得分:0)
如果Monit
是VBA变量,请尝试以下方法:
SQLDel = "DELETE FROM HBAU WHERE [PeoplesoftID] =" & PSID & " and [DATE] =#" & InputDate & "# and [MonitorNumber] = " & Monit
Peoplesoft ID
也应PeoplesoftID
吗?请注意,如果您的PeoplesoftID
具有数字类型,则不需要PSID
周围的单引号。