在sqlserver里是可以update b1 set b1.col=b2.col from b2 where b1.col2=b2.col2
我在VF里就是有问题
比如一个是参数表,一个是数值表,需要从从参数表中获得数值来更新数值表
不知道语句如何.先谢了:)解决马上结帖.
---------------------------------------------------------------
在vfp中需要通过关联来解决这个问题:
&&对b2的col2字段建索引,如果已有索引忽略下面两语句
select b2
index on col2 tag col2
&&将b1与b2建立关联
select b1
set relation to col2 into b2
&&更新b1的col字段
replace all col with b2.col
---------------------------------------------------------------
select b2
scan
update b1 set b1.col=b2.col where b1.col2=b2.col2
endscan