List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 12 1999 11:15pm
Subject:RE: delete query
View as plain text  
>>>>> "David" == David Moreno S <dmoreno@stripped> writes:

David> that obvius, i mean i need to delete all the semi-repeated elemnts, i mean
David> all the elements that are again but with and "/" at the end...

David> -----Original Message-----
David> From: sinisa@stripped [mailto:sinisa@stripped]
David> Sent: Viernes, 22 de Octubre de 1999 01:47 p.m.
David> To: dmoreno@stripped
David> Cc: mysql@stripped
David> Subject: Re: delete query

David> David Moreno S. writes:
>> Hi everybody, does any body knows how can i do to get a query thats
David> delete
>> from a table all the records that has some other similar: for example
>> item		price
>> house		89
>> house/	89
>> car		89
>> car/		89
>> i would like to delete house/ and car/, the problem is that my database
David> has
>> 13000 items and like 2000 cases like the above, so i want to perform a
David> query
>> that doesit....


You can do this by adding an extra column with alter table.
Populate then the extra columns with the 'item' with any '/' removed.
Then do a new alter table and make the extra column an unique key.
(This will delete the duplicates).
Now issue a last alter table to delete the extra column.


PS: Sorry for the long delay before replying, but I just come back from
    a 2 weeks vacation trip.

delete queryDavid Moreno S.22 Oct
  • Sample Application C or C++Miguel Angel Sol√≥rzano22 Oct
    • Re: Sample Application C or C++sinisa22 Oct
  • Re: delete querysinisa22 Oct
    • RE: delete queryDavid Moreno S.22 Oct
      • RE: delete querysinisa22 Oct
      • RE: delete queryMichael Widenius13 Nov
  • Re: Sample Application C or C++Miguel Angel Sol√≥rzano22 Oct
    • Re: Sample Application C or C++sinisa23 Oct
    • Re: Sample Application C or C++Michael Widenius13 Nov
RE: delete queryIndrek Siitan22 Oct
Re: delete queryBogdan Paduraru23 Oct