General information
Category:
Coding, syntax & commands
Title:
Removing duplicate records
Hello:
I'm trying to write a program to remove duplicate records from my
database table. I need to remove the index first, scan for duplicates, delete all and then recall the first record of each duplicate and then add the regular index back. CAn I do this
without having to resetting the relationships up in the database?
THis is my rough code. Any help would be appreciated.
close all
set defa to \wincats\data
use act_plan
delete tag sincase of act_plan
set order to sin
go top
dsin = sin
dadddate = add_date
daddtime = add_time
Scan
locate for sin = dsin, add_date = dadddate, add_time = daddtime
Do while found()
delete
go top
recall
pack
Endscan
ALTER TABLE Act_plan ADD PRIMARY KEY Sin + Caseno TAG Sincase
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only