sele 1
use tmp1
sele 2
use tmp2
REPLACE tmp2.zb1 WITH stuf(tmp2.zb1,1,2,subs(tmp1.zb1,1,2)) FOR tmp2.date=tmp1.date
怎么只能替换tmp1.dbf正所在的记录(一条记录),而不是替换全部记录
VFP9.0 版本
UPDATE tmp2 SET SUBSTR(tmp2.zb1,1,2)=subs(tmp1.zb1,1,2) WHERE 1 tmp2.date=tmp1.date from tmp1
UPDATE tmp2 SET tmp2.zb1=stuf(tmp2.zb1,1,2,subs(tmp1.zb1,1,2)) WHERE 1 tmp2.date=tmp1.date from tmp1
2个都出错,不知道怎么写了
行是行了,先替换了前2个字符,现在想再替换后2个字符,知道可以
UPDATE tmp2 SET tmp2.zb1=subs(tmp1.zb1,1,4) WHERE tmp2.date=tmp1.date from tmp1
但如果分2步怎么写,谢谢
1、UPDATE tmp2 SET tmp2.zb1=subs(tmp1.zb1,1,2) WHERE tmp2.date=tmp1.date from tmp1
2、?????????????