我正在使用这个脚本,尝试加入3个条件的2个表,并更新T1:
Update T1 set T1.Inci = T2.Inci ON T1.Brands = T2.Brands AND T1.Category= T2.Category AND T1.Date = T2.Date
但我遇到:
关键字“ON”附近的语法不正确.
不明白为什么.
解决方法
UPDATE T1 SET T1.Inci = T2.Inci FROM T1 INNER JOIN T2 ON T1.Brands = T2.Brands AND T1.Category= T2.Category AND T1.Date = T2.Date