以下是引用lasanding在2012-2-8 13:21:08的发言:
请教各位老师:如何对‘字段A+字段B+字段C’进行查重啊?
USE TABLE
FOR I=1 TO RECCOUNT()
GO I
OLDRECN=I
A1=A
B1=B
C1=C
** 上述三个字段,如有字符型数据,要用ALLTRIM()处理
COUNT REST TO X FOR (A==A1 AND B==B1 AND C==C1) AND DELETE()=.F.
IF X>1
DELETE FOR A==A1 AND B==B1 AND C==C1
BROWSE FOR A==A1 AND B==B1 AND C==C1
ENDIF
I=OLDRECN
ENDFOR
** RECALL ALL
[
本帖最后由 sdta 于 2012-2-9 01:21 编辑 ]