Oh dear, I didn't make the first paragraph very clear.  I would, before 
your form submission writes to the database, first do a query to see if 
that name exists in the database (you could show the entry (or only 
portions of it.... zip maybe) so the person could double check to see if, 
indeed, they had already submitted their names) and then allow them to 
cancel the submission or follow through if they are not the same person.

You may also concatenate the zip code onto the 'name' to make it more 
distinct or concatenate what you need to check that it's a unique entry and 
do a distinct.

I would at sometime (when you have free time (I know 2067 if you are like 
me)) and clean out duplicate entries.


At 10:22 AM 1/3/02 -0600, you wrote:
>the concatenation will depend on the DBMS you are using.  I would also redo
>your submissions to check to see if the customer is in db first the not
>resubmit (and tell customer they are already there)
>But...
>
>select distinct (firstname + " " + lastname) as name from customers
>
>That should do it.  You could also add middle initial too if you are afraid
>of eliminating John D Doe when there is also a John A Doe
>
>At 10:36 AM 1/3/02 -0500, you wrote:
> >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
> >
> >
> >
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to