我需要更新其中pdate(日期字段)不在当前月份和年份的第1天和第20天之间的行.
我正在使用下面编写的代码,但它给出了一个错误,说"预期参数太少"1.我使用MS Access 2007作为数据库.
cn.Execute "update water set prel = (prel + (mmt * (tx / 100))) where pdate not between 1-" & Format$(Now, "MMM") & "-" & Format$(Now, "YYYY") & " and 20-" & Format$(Now, "MMM") & "-" & Format$(Now, "YYYY") & " "
Run Code Online (Sandbox Code Playgroud)