删除不是相同重复项的重复项

  • 本文关键字:删除 foxpro visual-foxpro
  • 更新时间 :
  • 英文 :


我正在尝试清除"重复项"(来自cmemail.csubject),即使它们在文件命名上并不相同。 以下是相同的文件(文件名除外)。 如何删除所有重复记录? 我不知道如何比较这些电子邮件,更不用说删除重复项了。

***ORIGINAL***  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT.MSG
**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT - 1.MSG 
**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT - 99.MSG 
**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT - 401.MS

根据您提供的信息,您可以尝试这样的事情(第一次浏览显示四条记录,第二次浏览仅显示原始记录)。可以在命令窗口中运行以下示例,以使用 DELETE 命令显示几个示例:

Set Deleted On
Create Cursor test (nrec i, cfile c(150))
Insert Into test Values (1,"***ORIGINAL***  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT.MSG")
Insert Into test Values (2,"**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT - 1.MSG")
Insert Into test Values (3,"**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991 -21 OCT 2013 07-00 GMT - 99.MSG")
Insert Into test Values (4,"**DUPLICATE **  2013-10-07 - CHANGEMAN@MICROSOFT.COM - 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 - CHANGEMAN@MICROSOFT.COM - MS DEMAND MAINTENANCE NOTIFICATION -  TN049991" $ cfile And Left(cfile,14)<>"***ORIGINAL***"
Browse Last

相关内容

  • 没有找到相关文章

最新更新