update 表2 set 数值=(select case month(日期)
when 1 then 1月
when 2 then 2月
when 3 then 3月
when 4 then 4月
when 5 then 5月
when 6 then 6月
when 7 then 7月
when 8 then 8月
when 9 then 9月
when 10 then 10月
when 11 then 11月
when 12 then 12月 end from 表1 where 货品=a.货品 and 年份=year(a.日期))
from 表2 a
when 1 then 1月
when 2 then 2月
when 3 then 3月
when 4 then 4月
when 5 then 5月
when 6 then 6月
when 7 then 7月
when 8 then 8月
when 9 then 9月
when 10 then 10月
when 11 then 11月
when 12 then 12月 end from 表1 where 货品=a.货品 and 年份=year(a.日期))
from 表2 a
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货