排序问题:xh字段未按12345678的顺序排列
SELECT BZ
REPLACE D1415 WITH (D14 - D15)
COUNT TO A1
COPY TO ARRAY M FIELDS D1415
SELECT GZDA
SET FILTER TO
REPLACE D1415 WITH (D14 - D15)
REPLACE XH1 WITH '99' FOR XH1 = ' '
GO TOP
I = 0
J = 0
DO WHILE I < A1
I = I + 1
REPLACE XH WITH I FOR D1415 = M(I)
LOCATE FOR D1415 = M(I)
IF .NOT. FOUND()
J = J + 1
ENDIF
REPLACE YM WITH I - J FOR D1415 = M(I)
ENDDO
SORT ON D107 , XH , XH1 , D43A /d , D43 /d , D48 /d , D45 /d TO ;
SYS(5) - '\gzgl\dbf\psk.dbf'
ZAP
APPEND FROM SYS(5) - '\gzgl\dbf\psk.dbf'
REPLACE XH WITH (RECNO())
GO TOP
YN = ;
MESSAGEBOX('表gzda.dbf中的数据已按“班组”的先后顺序成功完成排序!',64,'提示!')
RETURN
*