[英]Update Query, MS Access: Syntax error (missing operator) in query expression
Simple straightforward example: I have two similar tables containing Key and Val fields.简单直接的示例:我有两个相似的表,其中包含Key和Val字段。
Then I try to update one table with the values from the other:然后我尝试用另一个表的值更新一个表:
docmd.RunSQL "UPDATE [t-dest] SET [t-dest].val = [t-source].val " & _
" FROM [t-source] WHERE [t-source].key = [t-dest].key"
and receive this Syntax Error message:并收到此语法错误消息:
Syntax error (missing operator) in query expression
'[t-source].val FROM [t-source]'
Please help to find the cause of this error!请帮忙找出这个错误的原因!
DoCmd.RunSQL "UPDATE [t-dest] INNER JOIN [t-source] " & _
"ON [t-source].key = [t-dest].key " & _
"SET [t-dest].val = [t-source].val"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.