34,590
社区成员
发帖
与我相关
我的任务
分享
select left(ltrim(b.s#),3)+'0'+ltrim(a.xg) as gg,a.sx# as s#
from a,b
where a.sx#=b.s#
select
gg, [s#] = left(b.[sx#],3)+'0'+cast(a.xg as varchar)
B表sx#的前3位+0+A表xg
from a, b
where a.[sx#] = b.[s#]
update b表
set gg =left(b.sx#,3)+'0'+a.xg from a表 a where a.sx#=b.sx#
set gg =left(b.sx#,3)+ CAST(gg AS VARCHAR(10)) +'0'+a.xg from a表 a where a.sx#=b.sx#
update b表
set gg =left(ltrim(b.sx#),3)+'0'+ltrim(a.xg) from a表 a where a.sx#=b.sx#
update b表
set gg =left(b.sx#,3)+'0'+a.xg from a表 a where a.sx#=b.sx#