MySQL Forums
Forum List  »  German

Re: Mysteriöser "duplicate entry error"
Posted by: Thomas Wiedmann
Date: August 08, 2012 02:10AM

also da sind massenhaft doppelte Datensätze drin. Der UNIQUE KEY kann nicht gestimmt haben. Wenn ich stattdessen nur als KEY verwende kann ich die Daten einlesen und prüfen.

SELECT product_link_attribute_id, link_id, COUNT(*) AS anzahl
  FROM catalog_product_link_attribute_int
 GROUP BY product_link_attribute_id, link_id
 HAVING COUNT(*) > 1;
 
[...]
|                         4     4241 |      2 |
|                         4 |    4242 |      2 |
|                         4 |    4243 |      2 |
|                         4 |    4299 |      2 |
|                         4 |    4300 |      2 |
+---------------------------+---------+--------+
317 rows in set (0.03 sec)

mysql>

Grüße
Thomas

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Mysteriöser "duplicate entry error"
1005
August 08, 2012 02:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.