That works fine, but I was wondering if there was another way to do it because I receive one text file everyday and the are always duplicate records. We just change to MySQL and I have to load this text file everyday to the database.
Thanks again!! Nato -----Original Message----- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 4:32 PM To: Natividad Castro; [EMAIL PROTECTED] Subject: RE: Deleting duplicate records At 16:29 -0500 3/4/02, Natividad Castro wrote: >Thank you very much!! that was very helpful. By the way, is there any other >way to get rid of duplicate records from a text file? What's wrong with the command Jeremy suggested? > >Thanks again >Nato > >-----Original Message----- >From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] >Sent: Monday, March 04, 2002 3:00 PM >To: Natividad Castro >Cc: [EMAIL PROTECTED] >Subject: Re: Deleting duplicate records > > >On Mon, Mar 04, 2002 at 02:48:06PM -0500, Natividad Castro wrote: > >> I'm new using mysql. I'm trying to load data from a text file to one >> of my table. This text file contains duplicate records. My question >> is how do you tell mysql to delete duplicate records and load just >> the ones that are not duplicate? I already tried the REPLACE and >> IGNORE key words but is I dont get the result that I want. Any idea > >If the data is in a text file, elimiate the duplicates before MySQL is >even involved: > > cat myfile.txt | sort | uniq > nodups.txt > >Jeremy >-- >Jeremy D. Zawodny, <[EMAIL PROTECTED]> >Technical Yahoo - Yahoo Finance >Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 > >MySQL 3.23.47-max: up 25 days, processed 842,341,115 queries (386/sec. avg) --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php