我正在尝试为以下操作运行更新命令: 在名为 t_AuditCompliance_import 的表格中 如果名为“Payable Time Entered By”的字段为空,请将NULL更新为“exception”。
DoCmd.RunSQL "UPDATE t_AuditCompliance_import SET t_AuditCompliance_import.[Payable Time Entered By] = ("exception")" _
& "WHERE (((t_AuditCompliance_import.[Payable Time Entered By]Is Null));"
任何帮助都将不胜感激。
答案 0 :(得分:1)
请尝试以下操作:
DoCmd.RunSQL "UPDATE t_AuditCompliance_import SET t_AuditCompliance_import.[Payable Time Entered By] = ""exception"" " _
& "WHERE (((t_AuditCompliance_import.[Payable Time Entered By] Is Null));"
答案 1 :(得分:0)
在]和Is之间没有空格,而且在WHERE子句的开头需要一个空格。应该是
DoCmd.RunSQL "UPDATE t_AuditCompliance_import SET t_AuditCompliance_import.[Payable Time Entered By] = ("exception")" _
& " WHERE (((t_AuditCompliance_import.[Payable Time Entered By] Is Null));"