On Wednesday 07 August 2002 09:10 am, Wulff D. Heiss wrote:
> dbmail@dbmail.org writes:
> >Has anyone been able to come up with a way to get rid of all the
> >duplicate
> >unique_id #s?  I have a lot of email with dupes and I need to get them
> >all
> >fixed as soon as possible.  Any ideas how to do that without going
> >through by
> >hand?  Thank you very much.
>
> trymysql's random function?
> i'm not sure, something
> update table SET uiniquie_id=random()
> could work.
> there are text functions to pad the result to fixed with. i think..
> or a char(random))+char(random))+char(random))+....
> where random is somehting in the ASCII set...
> just an idea and i have no time to check it

I talked to one of the database developers here and they gave me this to use.  
It should go through and update all the unique_is #s to have the first part 
of the string before the "A" be the message_id and the last part the same as 
it currently is.  It looks like this is how they are doing the unique_id #s 
now and has been working for me with 120,000 messages.

Without a futher a do the command:
UPDATE messages SET unique_id = CONCAT( message_idnr, SUBSTRING(unique_id, 
LOCATE("A", unique_id)));

Hope this works for everyone else.




-- 
Bret Baptist
Systems and Technical Support Specialist
[EMAIL PROTECTED]
Internet Exposure, Inc.
http://www.iexposure.com
 
(612)676-1946 x17
Web Development-Web Marketing-ISP Services
------------------------------------------


Today is the tomorrow you worried about yesterday.

Reply via email to