谁能告诉我这句语法哪里错了?

Sql = "update " & myTable & " a,[Excel 12.0;imex=0;Database=" & ActiveWorkbook.FullName & "].[自助取数$" _
& Range("a1").CurrentRegion.Address(0, 0) & "] b set " & Mid(strTemp, 2) & " where a.统计日期=b.统计日期"
cnn.Execute Sql '不判断,更新可能存在的“学生编号”

update不应该是
update 表名 set 字段1=“赋值1”,字段2="赋值2" where 条件
你的里面怎么set后面没等号了?

Set conn = CreateObject("adodb.connection")
conn.Open "provider=microsoft.jet.oledb.4.0;extended properties=excel 8.0;data source=" & ThisWorkbook.FullName
Sql = "UPDATE [店铺名称$] set 地址='abc',电话='123' where 店铺名称='我爱我家'"
conn.Execute (Sql)
conn.Close: Set conn = Nothing来自:求助得到的回答
温馨提示:答案为网友推荐,仅供参考