SELECT a.bqzm,SUBSTR(a.zd1,12,2) s_1w,SUBSTR(b.zd2,12,2) s_2w FROM zb1 a,zb2 b WHERE SUBSTR(a.zd1,12,2)<>SUBSTR(b.zd2,12,2) AND a.dae=b.dae INTO CURSOR tmp9999
这样也行
SELECT a.bqzm,SUBSTR(a.zd1,12,2) as s_1w,SUBSTR(b.zd2,12,2) as s_2w FROM zb1 a,zb2 b WHERE SUBSTR(a.zd1,12,2)<>SUBSTR(b.zd2,12,2) AND a.dae=b.dae INTO CURSOR tmp9999