遇到运行时错误
不正确的Syntex
近C:\Users\Emp_ID\Desktop\FolderName\FileName.xlsm
set rs = cnn.Execute("update EO_datawh.dbo.TableName set email_status = 'Sent' From '" & ThisWorkbook.FullName & "'.'Sheet1$' a join EO_datawh.dbo.TableName b on a.sr_number = b.sr_number")
答案 0 :(得分:0)
使用别名' b'而不是' EO_datawh.dbo.TableName'在更新之后:
set rs = cnn.Execute("update b set email_status = 'Sent' From '" & ThisWorkbook.FullName & "'.'Sheet1$' a join EO_datawh.dbo.TableName b on a.sr_number = b.sr_number")