Hello;
hope to get a little help. Have two source files I need to check for duplicates within Visual Foxpro 9. Below are the steps I need to impliment and below that is the actual code. I am close but need help with the code to make sure this will accomplish what I need.
I appreciate any help.
* 1. Setup excel headers (Source doc)
* 2. Save excel as dbf (Table #1)
* 4. Export Exceed to excel
* 5. Convert Exceed excel to dbf (Table # 2)
* 6. Scan for dups
* 7. Export to excel (Table # 1)
* 8. Import into Exceed
*SET EXCLUSIVE OFF
SET DEFAULT TO c:\temp
*getfile()
*IMPORT FROM "c:\temp\source doc
2005-2006.xls" TYPE xls
SCAN all
STORE fname TO cFname
STORE lname TO cLname
STORE SLNAME TO cSLFname
STORE SPOUSE TO cSPOUSE
STORE ORGNAME TO cORGNAME
STORE jobtitle TO cjobtitle
STORE COMPANYDIV TO cCOMPANYDIV
STORE ADDRES1 TO cADDRES1
STORE ADDRES2 TO cADDRES2
STORE city TO ccity
STORE state TO cstate
STORE zip TO czip
STORE phone TO cphone
STORE phtype TO cphtype
STORE phnotes TO cphnotes
STORE county TO ccounty
SELECT 2
LOCATE FOR lname = cLname
IF FOUND()
MESSAGEBOX("Duplicate Found")
SELECT 1
delete
* do something
IF NOT FOUND()
* do something
SELECT 1
endscan
hope to get a little help. Have two source files I need to check for duplicates within Visual Foxpro 9. Below are the steps I need to impliment and below that is the actual code. I am close but need help with the code to make sure this will accomplish what I need.
I appreciate any help.
* 1. Setup excel headers (Source doc)
* 2. Save excel as dbf (Table #1)
* 4. Export Exceed to excel
* 5. Convert Exceed excel to dbf (Table # 2)
* 6. Scan for dups
* 7. Export to excel (Table # 1)
* 8. Import into Exceed
*SET EXCLUSIVE OFF
SET DEFAULT TO c:\temp
*getfile()
*IMPORT FROM "c:\temp\source doc
2005-2006.xls" TYPE xls
SCAN all
STORE fname TO cFname
STORE lname TO cLname
STORE SLNAME TO cSLFname
STORE SPOUSE TO cSPOUSE
STORE ORGNAME TO cORGNAME
STORE jobtitle TO cjobtitle
STORE COMPANYDIV TO cCOMPANYDIV
STORE ADDRES1 TO cADDRES1
STORE ADDRES2 TO cADDRES2
STORE city TO ccity
STORE state TO cstate
STORE zip TO czip
STORE phone TO cphone
STORE phtype TO cphtype
STORE phnotes TO cphnotes
STORE county TO ccounty
SELECT 2
LOCATE FOR lname = cLname
IF FOUND()
MESSAGEBOX("Duplicate Found")
SELECT 1
delete
* do something
IF NOT FOUND()
* do something
SELECT 1
endscan