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