----把所有的汇总字段整成一条记录,用逗号隔开,且更新至项目明细表中str:='insert into xmmx_temp1(select pro_code,wmsys.wm_concat(Pmc_OtherMeans)as Pmc_OtherMeans,wmsys.wm_concat(Pmc_Progress) as Pmc_Progress, wmsys.wm_concat(Pmc_MainGain) as Pmc_MainGain, wmsys.wm_concat(Pmc_ProblemSuggest) as Pmc_ProblemSuggest, wmsys.wm_concat(Pmc_Participant) as Pmc_Participant, wmsys.wm_concat(Pmc_Equipment) as Pmc_Equipment, wmsys.wm_concat(Pmc_Re) as Pmc_Re from xmmx_temp group by pro_code)'; execute immediate str; str:='update Projectxmmx_temp a set a.Pmc_OtherMeans=(select b.Pmc_OtherMeans from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_Progress=(select b.Pmc_Progress from xmmx_temp1 b where a.pro_code=b.pro_code), a.Pmc_MainGain=(select b.Pmc_MainGain from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_ProblemSuggest=(select b.Pmc_ProblemSuggest from xmmx_temp1 b where a.pro_code=b.pro_code), a.Pmc_Participant=(select b.Pmc_Participant from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_Equipment=(select b.Pmc_Equipment from xmmx_temp1 b where a.pro_code=b.pro_code), a.Pmc_Re=(select b.Pmc_Re from xmmx_temp1 b where a.pro_code=b.pro_code)'; execute immediate str;
wmsys.wm_concat(Pmc_ProblemSuggest) as Pmc_ProblemSuggest, wmsys.wm_concat(Pmc_Participant) as Pmc_Participant, wmsys.wm_concat(Pmc_Equipment) as Pmc_Equipment,
wmsys.wm_concat(Pmc_Re) as Pmc_Re from xmmx_temp group by pro_code)';
execute immediate str;
str:='update Projectxmmx_temp a set a.Pmc_OtherMeans=(select b.Pmc_OtherMeans from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_Progress=(select b.Pmc_Progress from xmmx_temp1 b where a.pro_code=b.pro_code),
a.Pmc_MainGain=(select b.Pmc_MainGain from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_ProblemSuggest=(select b.Pmc_ProblemSuggest from xmmx_temp1 b where a.pro_code=b.pro_code),
a.Pmc_Participant=(select b.Pmc_Participant from xmmx_temp1 b where a.pro_code=b.pro_code),a.Pmc_Equipment=(select b.Pmc_Equipment from xmmx_temp1 b where a.pro_code=b.pro_code),
a.Pmc_Re=(select b.Pmc_Re from xmmx_temp1 b where a.pro_code=b.pro_code)';
execute immediate str;
10.2.0.5开始就是clob额 确实 - -