1、去除表中某个字段对应的值中的空格??
update ST_PPTN_D set STNM=REPLACE(STNM,' ', '');
2、根据一个表中筛选出来的字段去更新另一个表中的某个对应字段??
update ST_RSVR_D
set ST_RSVR_D.LGTD=tt.LGTD,ST_RSVR_D.LTTD=tt.LTTD
from
(
select 水位站编码,LGTD,LTTD from 水位站 where
LGTD is not null and LTTD is not null and LGTD<>'' and LTTD<>'' and
slasttime is not null and slasttime>'2012-01-01'
) tt
where ST_RSVR_D.STCD=tt.水位站编码