Re: Duplicates

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17750
interpreted = N
texte = >>For the 2 of you who haven't added me to your kill file... >>Does anyone have a good way for detecting records that have a duplicate >>value in one field, then noting this, or deleting it? > > >What's the purpose of this effort? Are you trying to create a keyword field >that doesn't have duplicate values in it? Or is this for some other purpose >entirely?Sorry, I should have been more specific with my request. I have a database with 4 fields. ID, Email, adddate, promostatus.. This will be used to send out mass mailings of specials and site announcements. (you have to sign up on the site, no spam.) Anyway, I want to check for duplicate email addresses, because whiny people pop up out of the wood work if heaven forbid they should get 2 copies of a piece of email. While I am writing the areas to manually enter names into the database to prevent duplicates, occasionally bulk names (from the companies accounting system) will be dumped in, and I want to run this as a preventative measure.Here's what I've come up with: (this prints out duplicate names on a web page) [search db=../emaillist.db&geIDdata=0&EMAILsumm=T&EMAILsort=1] [founditems] [search db=../emaillist.db&eqEMAILdata=[EMAIL]&adddatesort=1] [showif [numfound]>1] [founditems][index]. [email] - [adddate]
[/founditems] [/showif] [/search] [/founditems] [/search]This is TERRIBLY inefficient, as the database contains 2300 records it therefor performs 2250 unique searches of the entire 2300 record database. This take about 35 seconds on my server.As an aside, This is another area where the CGI sucks. While this is running, the server comes to a apparent complete stop, the webserver (webstar) won't server GIF images or other html pages, until this process is complete.I went next door, and was talking to a programmer over there, and he said, why not just find the unique values, and write them to a new database? A simple rename, and poof! completed. I am going to try this next, but I am wondering if there is a better way to do it inside the same database. I was thinking of finding every record, sorting by email address, then comparing the current record with the next record and if they match, deleting one of them. I just don't know how to code that. Brian B. Burton BOFH - Department of Redundancy Department --------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] prevent database duplicates (Stephen Braun 2019)
  2. Re: [WebDNA] prevent database duplicates (Stuart Tremain 2019)
  3. Re: [WebDNA] prevent database duplicates (Alex Mccombie 2019)
  4. [WebDNA] prevent database duplicates (Stephen Braun 2019)
  5. Re: [WebDNA] [sendmail] random duplicates (Donovan Brooke 2010)
  6. Re: [WebDNA] [sendmail] random duplicates (Steve Raslevich - Northern Sound 2010)
  7. Re: [WebDNA] [sendmail] random duplicates (Tom Duke 2010)
  8. Re: [WebDNA] [sendmail] random duplicates (Stuart Tremain 2010)
  9. Re: [WebDNA] [sendmail] random duplicates (Steve Raslevich - Northern Sound 2010)
  10. Re: [WebDNA] [sendmail] random duplicates (Tom Duke 2010)
  11. [WebDNA] [sendmail] random duplicates (Steve Raslevich - Northern Sound 2010)
  12. Re: Find Duplicates in Cart (John Peacock 2001)
  13. Re: Find Duplicates in Cart (Clint Davis 2001)
  14. Re: Find Duplicates in Cart (John Peacock 2001)
  15. Find Duplicates in Cart (Clint Davis 2001)
  16. How to find duplicates - With code samples (Brian B. Burton 2000)
  17. Re: Deleting duplicates from a db (Matt Helbing 2000)
  18. Re: Deleting duplicates from a db (Michael O Shea 2000)
  19. Deleting duplicates from a db (Will Starck 2000)
  20. Re: WHY SO MANY DUPLICATES? (Martin Bech 1999)
  21. WHY SO MANY DUPLICATES? (The Mooseman 1999)
  22. WHY SO MANY DUPLICATES? (The Mooseman 1999)
  23. Re: Duplicates (Kenneth Grome 1998)
  24. Re: Duplicates (Brian B. Burton 1998)
  25. Re: Duplicates (Dave MacLeay 1998)
  26. Re: Duplicates (Brian B. Burton 1998)
  27. Re: Duplicates (Kenneth Grome 1998)
  28. Re: Duplicates (Peter Ostry 1998)
  29. Re: Duplicates (Brian B. Burton 1998)
  30. Re: Duplicates (Kenneth Grome 1998)
  31. Duplicates (Brian B. Burton 1998)
>>For the 2 of you who haven't added me to your kill file... >>Does anyone have a good way for detecting records that have a duplicate >>value in one field, then noting this, or deleting it? > > >What's the purpose of this effort? Are you trying to create a keyword field >that doesn't have duplicate values in it? Or is this for some other purpose >entirely?Sorry, I should have been more specific with my request. I have a database with 4 fields. ID, Email, adddate, promostatus.. This will be used to send out mass mailings of specials and site announcements. (you have to sign up on the site, no spam.) Anyway, I want to check for duplicate email addresses, because whiny people pop up out of the wood work if heaven forbid they should get 2 copies of a piece of email. While I am writing the areas to manually enter names into the database to prevent duplicates, occasionally bulk names (from the companies accounting system) will be dumped in, and I want to run this as a preventative measure.Here's what I've come up with: (this prints out duplicate names on a web page) [search db=../emaillist.db&geIDdata=0&EMAILsumm=T&EMAILsort=1] [founditems] [search db=../emaillist.db&eqEMAILdata=[EMAIL]&adddatesort=1] [showif [numfound]>1] [founditems][index]. [email] - [adddate]
[/founditems] [/showif] [/search] [/founditems] [/search]This is TERRIBLY inefficient, as the database contains 2300 records it therefor performs 2250 unique searches of the entire 2300 record database. This take about 35 seconds on my server.As an aside, This is another area where the CGI sucks. While this is running, the server comes to a apparent complete stop, the webserver (webstar) won't server GIF images or other html pages, until this process is complete.I went next door, and was talking to a programmer over there, and he said, why not just find the unique values, and write them to a new database? A simple rename, and poof! completed. I am going to try this next, but I am wondering if there is a better way to do it inside the same database. I was thinking of finding every record, sorting by email address, then comparing the current record with the next record and if they match, deleting one of them. I just don't know how to code that. Brian B. Burton BOFH - Department of Redundancy Department --------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.com Brian B. Burton

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

DataBaseHelper Flawed (1997) Zip Code Search (2000) [OT] Java Scroller (2006) Emailer problems. (1998) [WebDNA] writing pdfs on the fly (Avery labels #5160) (2010) Fun with Dates - revisited (1997) WC2b12: Yes, Formulas.db is for real (1997) RE: Ongoing group search problems ... (1997) ReturnRaw (1999) Re:WebCat for mass emailings (1997) Max Record length restated as maybe bug (1997) Tags in the header (2000) Fileinfo... (2000) Numbers from Sentence (2003) refreshing IE with posted .tmpl (1997) WebCat2.0 [format thousands .0f] no go (1997) Testing the WebCat Email List Members (2000) [Webcat 2]Next (1997) Webcat 3.0.5b9, b8 trigger failures ON WEBSTAR (1999) Format question WC Mac f3 (1997)