2013-10-16 258 views
0

我想清除「重複項」(來自cmemails.csubject),即使它們在文件命名上不相同。以下是相同的文件(文件名除外)。我如何擺脫所有重複記錄?我無法弄清楚如何比較這些電子郵件,更不用說刪除重複。刪除不重複的重複項

***ORIGINAL*** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT.MSG 
**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 1.MSG 
**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 99.MSG 
**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 401.MS 

回答

0

根據您所提供的,你可以嘗試這樣的事情的信息(第一瀏覽顯示四條記錄,第二個瀏覽顯示只有原來的)。下面的例子可以在命令窗口中運行使用DELETE命令顯示幾個樣本:

Set Deleted On 
Create Cursor test (nrec i, cfile c(150)) 
Insert Into test Values (1,"***ORIGINAL*** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT.MSG") 
Insert Into test Values (2,"**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 1.MSG") 
Insert Into test Values (3,"**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 99.MSG") 
Insert Into test Values (4,"**DUPLICATE ** 2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991 -21 OCT 2013 07-00 GMT - 401.MS") 
Browse Last 
Delete For Left(cfile,14)="**DUPLICATE **" 
Browse Last 
Recall All 
Browse Last 
Delete For "2013-10-07 - [email protected] - MS DEMAND MAINTENANCE NOTIFICATION - TN049991" $ cfile And Left(cfile,14)<>"***ORIGINAL***" 
Browse Last