Article ID: 126272
Article Last Modified on 12/1/2003
IF _MAC=.T.
SET DEFAULT TO "Hard drive:FoxPro 2.6:Tutorial:"
ELSE
SET DEFAULT TO Sys(2004)+"Tutorial"
&& SET DEFAULT TO SYS(2004)+"Samples\Data" in Visual FoxPro
ENDIF
USE CUSTOMER.DBF
COPY TO TEST.DBF FOR RECNO() < 10
USE TEST
INDEX ON cno TAG cno ADDITIVE
&& INDEX on cust_id TAG custid ADDITIVE in Visual FoxPro
The TEST.DBF table now contains records from the CUSTOMER.DBF table. These
records serve as the duplicate records for the examples listed below. A
.CDX index also exists for the TEST.DBF.
USE Customer IN 0
USE Test IN 0 ORDER TAG CNO
SELECT Customer
SCAN
m.cno=cno
&& m.custid=cust_id in Visual FoxPro
SELECT Test
SEEK(m.cno)
&& SEEK (m.custid) in Visual FoxPro
IF FOUND()= .T.
SELECT Customer
DELETE
ENDIF
SELECT Customer
ENDSCAN
USE Customer.dbf in 0
USE Test.dbf IN 0 ORDER TAG cno
SELECT Customer
SET RELATION TO cno INTO Test ADDITIVE
DELETE ALL FOR FOUND('Test')
Additional query words: VFoxWin FoxWin FoxDos FoxMac
Keywords: kbcode KB126272