[英]SQL Update code to move data from one cell to another
我在Visual Basic中对sql服务器具有以下代码。 部分代码:
Comments = ReasonNotDone + ' " & Today.AddDays(-1).ToShortDateString & "', ReasonNotDone = '' WHERE IsDone = 'False' OR IsDone IS NULL AND ActiveDate = '" & Now.AddDays(-1).ToShortDateString & "'"
此代码正确吗? “ Comments
单元格设置为日期,但是未添加来自ReasonNotDone
的数据。 但是,来自ReasonNotDone
的数据被设置为''
。 在得到Comments
的值之前, ReasonNotDone
的数据是否可能设置为''
?
除了我作为注释发布的SQL语法错误之外,您还关注着
ReasonNotDone = '' WHERE IsDone = 'False' OR IsDone IS NULL AND ActiveDate = '" & Now.AddDays(-1).ToShortDateString & "'"
以及您打算在哪里补充其他内容
ReasonNotDone + **' " & Today.AddDays(-1).ToShortDateString & "'**
您的SQL将像这样结束
... AND ActiveDate = '4/4/2014''4/4/2014'
它完全弄乱了语法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.