USE AB
ALTER TABLE AB ADD S1 N(8)
ALTER TABLE AB ADD S2 N(8)
REPL ALL S1 WITH 1,S2 WITH RECN()
INDE ON STR(SZH)+STR(XH)+STR(TH)+XM TAG XM
TOTA ON STR(SZH)+STR(XH)+STR(TH)+XM FIEL S1 TO AC
SELE 0
USE AC
DELE FOR S1>1
PACK
SCAN
T2=S2
SELE AB
DELE FOR S2=T2
SELE AC
ENDS
CLOS DATA
USE AB
PACK