Please - do not send your requests for this query to the list! Richard, please post the email address that you'd like the users to send their request to!
Thanks for using Legacy. Sherry Customer Support Millennia Corporation [EMAIL PROTECTED] http://www.LegacyFamilyTree.com We are changing the world of genealogy! When replying to this message, please include all previous correspondence. Thanks. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Van Wasshnova Sent: Saturday, June 16, 2007 10:23 AM To: LegacyUserGroup@legacyfamilytree.com Subject: Re: [LegacyUG] HELP! duplicate multimedias It looks to me that Dennis Kowallek has written a perfect delete query for Lisa based on my earlier, imperfect, explanation of the problem. Lisa, you will have to confirm but I tested it on a database in which, I believe, I simulated your problem. DELETE * FROM tblBR WHERE tblBR.IDBR in (SELECT Max(tblBR.IDBR) AS MaxOfIDBR FROM tblBR GROUP BY tblBR.IDIR, tblBR.IDType, tblBR.PicType, tblBR.PicName, tblBR.IDBPPic HAVING (((Count(*))>1))) I will send off-list a small Legacy db attachment to all concerned by request. It is just a married couple. His birth source is like Lisa's problem (I believe). His baptism and wife's death source are examples of the duplication problem I had and which Dennis solved with another delete query (below). The one above solves Lisa's problem and deletes the duplicate picture in birth source. Remove duplicate source citations: DELETE * FROM tblSX WHERE tblSX.IDSX in (SELECT Max(tblSX.IDSX) AS MaxOfIDSX FROM tblSX GROUP BY tblSX.IDSR, tblSX.Type, tblSX.IDIME, tblSX.SrcDetail HAVING (((Count(*))>1))); Thank you very much Dennis for a great learning experience. Richard Van Wasshnova Have you unlocked the real power of Legacy? Legacy 6.0 Deluxe has 92 features not found in the Standard Edition. Learn more about these features at http://legacyfamilytree.com/DeluxeEdition.asp. Legacy User Group guidelines can be found at: http://www.LegacyFamilyTree.com/Etiquette.asp To find past messages, please go to our searchable archives at: http://www.mail-archive.com/legacyusergroup@legacyfamilytree.com/ For online technical support, please visit http://www.LegacyFamilyTree.com/Help.asp To unsubscribe please visit: http://www.LegacyFamilyTree.com/LegacyLists.asp