SELECT * FROM 大小比较.DBF WHERE TYPE(pdzj)="N" INTO TABLE dx.dbf
use dx.dbf
Blank Fields pdzjd, pdzjx, pdzjt All
GO TOP
PRIVATE X
X=""
SCAN
X1=IIF(pdzj>X,[REPLACE pdzjd WITH "大"],(IIF(pdzj<X,[REPLACE pdzjx WITH "小"],[REPLACE pdzjt WITH "同"])))
&X1
X=pdzj
ENDSCAN
SELECT 大小比较.jnh, 大小比较.pdzj, Dx.pdzjd, Dx.pdzjx, Dx.pdzjt FROM 大小比较 LEFT OUTER JOIN dx ON
大小比较.jnh = Dx.jnh INTO TABLE dx1.dbf
REPLACE ALL pdzjd WITH "" FOR ISNULL(pdzjd)
&&替换.NULL.
REPLACE ALL pdzjx WITH "" FOR ISNULL(pdzjx)
&&替换.NULL.
REPLACE ALL pdzjt WITH "" FOR ISNULL(pdzjt)
&&替换.NULL.
BROWSE