求助:贴关于UPDATE命令
前提YBTOWN表是镇与邮编的对照表要素如下:yb town
123231 xxxx
SBGZ201503.DBF为主数据表里面有address(地址)与YB(邮编)
代码如下:
CLOSE ALL
SELECT 1
USE sbgz201503.dbf
SELECT 2
USE ybtown.dbf
GO TOP
DO WHILE NOT EOF()
x=ybtown.town
y=sbgz201503.address
UPDATE sbgz201503.dbf SET ALLTRIM(yb)=ALLTRIM(ybtown.yb) from ybtown.dbf WHERE exists(select * from sbgz201503.dbf WHERE x$y)
SKIP
ENDDO
运行后报错如附件,求大神给点意见