gpt4 book ai didi

sql - UPDATE sql 不更新

转载 作者:行者123 更新时间:2023-12-04 22:31:45 28 4
gpt4 key购买 nike

我遇到这个 UPDATE sql 的问题,由于某种原因它没有更新表 NOMI。我没有收到任何类型的错误。我正在用另一个表中的值更新此表,该表是 Me.(...)正在获得他们的值(value)。当我做 Debug.Print我明白了:

UPDATE NOMI SET workername = 'Bob', dateassigned = #5/27/2015 8:52:52 PM#, actiondate = #5/30/2015 11:56:43 AM#, caseid = 'BO09999', lastname = 'Smith', firstname = 'Jane', Program = 'Awesome', language = 'English', Status = 'Unprocessed' WHERE ((IsNull([caseid]))<>False)

代码如下:

strSQL = "UPDATE NOMI SET workername = '" & Me.workername & "', 
dateassigned = #" & Me.dateassigned & "#, actiondate = #" & Now & "#,
caseid = '" & Me.caseid & "', lastname = '" & Me.lastname & "',
firstname = '" & Me.firstname & "', Program = '" & Me.program & "',
language = '" & Me.language & "', Status = '" & Me.Status & "'
WHERE ((IsNull([caseid]))<>False)"

CurrentDb.Execute strSQL

最佳答案

这个:

WHERE ((IsNull([caseid]))<>False)

基本意思是:

WHERE caseid is null

对于表格中的任何行,这可能都不成立。当然如果caseid是主键,则不能为null

关于sql - UPDATE sql 不更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30550161/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com