Ben, I'd first determine what constitutes a "duplicate" (perhaps a combo of name/address/phone/e-mail). Then you can grab all duplicates (all records with the matching combo above) and their IDs...build a "DeleteIDList" variable....then delete 'em all (leaving behind 1 good record of course...and that's the tricky part).
HTH Bryan Stevenson VP & Director of E-Commerce Development Electric Edge Systems Group Inc. p. 250.920.8830 e. [EMAIL PROTECTED] --------------------------------------------------------- Allaire Alliance Partner www.allaire.com ----- Original Message ----- From: "Ben Densmore" <[EMAIL PROTECTED]> To: "SQL" <[EMAIL PROTECTED]> Sent: Thursday, January 03, 2002 7:36 AM Subject: Stuck on Query > Hi Everyone, > I have a DB with about 500,000 records in it. This DB is from a sales > lead form that is on our website. Occasionally we have customers submit > the form twice or even more than that. I want to only display one of > these leads to our sales dept if there is a duplicate, or I want to > delete all the duplicates in there. I have tried several things but > haevn't had as much success as I would like, I was using a query that > would select just the top 1 id if there were duplicates which worked but > it slowed down the query dramatically. I'm using CF to display my data > and at times I would get an error that the process was deadlocked. Can > someone give me some ideas on the best way to either display only one > record if there are duplicates that won't cut performance time down or > how I can delete all but one of the duplicates? > > Thank You, > Ben Densmore > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
