我这里有一条更新语句
update Hplt_JCDMX set Hplt_JCDMX.zhongwmc=
( select jsgl_hpsx.zhongwmc from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)
其中
( select jsgl_hpsx.zhongwmc from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)
返回的是多个值,我想把他们和起来都给Hplt_JCDMX.zhongwmc,该怎么办
update Hplt_JCDMX set Hplt_JCDMX.zhongwmc=
( select jsgl_hpsx.zhongwmc from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)
其中
( select jsgl_hpsx.zhongwmc from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)
返回的是多个值,我想把他们和起来都给Hplt_JCDMX.zhongwmc,该怎么办
( select sum(jsgl_hpsx.zhongwmc) from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)
( select sum(jsgl_hpsx.zhongwmc) from jsgl_hpsx where
Hplt_JCDMX.huoh=jsgl_hpsx.huoh and Hplt_JCDMX.hanl=jsgl_hpsx.hanl
)