(求助)Oracle 中SQL语句表更新多行记录
问题描述:先查询统计出数据,再降查询出来的数据更新到某表对应行中的对应字段,对应的行通过关键字doubttaxpayerid来对应,需要更新的字段有:doubts,IndicatorScoreTotal。怎样写SQL语句?!(通过一条语句实现)查询统计的输入SQL语句为:
select t.doubttaxpayerid,count(t.doubttaxpayerid) doubts,
sum(t.indicatorscore) IndicatorScoreTotal
from TB_Evl_TaxpayerDoubtInfo t,
TB_Evl_DoubtTaxpayer t1
where t1.doubttaxpayerlistid = '23601001000200808Y101'
and t.doubttaxpayerid = t1.doubttaxpayerid
and t.fortaskflag = 1
and t1.evaluatedflag = 1
group by t.doubttaxpayerid
需要更新的表为:TB_Evl_DoubtTaxpayer