mercredi 15 juin 2016

Error #1062 - Duplicate entry for key 'PRIMARY'

I'm trying to update a column with these update statements

UPDATE `icms_art_cat` SET `CategoryID`=127,`Updated`=1 WHERE `CategoryID`=87 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=131,`Updated`=1 WHERE `CategoryID`=173 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=137,`Updated`=1 WHERE `CategoryID`=127 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=139,`Updated`=1 WHERE `CategoryID`=177 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=135,`Updated`=1 WHERE `CategoryID`=195 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=33,`Updated`=1 WHERE `CategoryID`=5 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=53,`Updated`=1 WHERE `CategoryID`=27 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=55,`Updated`=1 WHERE `CategoryID`=29 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=57,`Updated`=1 WHERE `CategoryID`=31 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=59,`Updated`=1 WHERE `CategoryID`=103 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=61,`Updated`=1 WHERE `CategoryID`=105 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=63,`Updated`=1 WHERE `CategoryID`=33 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=65,`Updated`=1 WHERE `CategoryID`=157 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=35,`Updated`=1 WHERE `CategoryID`=7 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=67,`Updated`=1 WHERE `CategoryID`=35 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=69,`Updated`=1 WHERE `CategoryID`=37 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=71,`Updated`=1 WHERE `CategoryID`=39 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=73,`Updated`=1 WHERE `CategoryID`=69 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=75,`Updated`=1 WHERE `CategoryID`=71 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=77,`Updated`=1 WHERE `CategoryID`=113 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=79,`Updated`=1 WHERE `CategoryID`=167 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=37,`Updated`=1 WHERE `CategoryID`=9 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=81,`Updated`=1 WHERE `CategoryID`=41 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=83,`Updated`=1 WHERE `CategoryID`=43 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=85,`Updated`=1 WHERE `CategoryID`=65 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=87,`Updated`=1 WHERE `CategoryID`=93 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=89,`Updated`=1 WHERE `CategoryID`=95 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=91,`Updated`=1 WHERE `CategoryID`=99 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=39,`Updated`=1 WHERE `CategoryID`=11 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=41,`Updated`=1 WHERE `CategoryID`=13 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=93,`Updated`=1 WHERE `CategoryID`=45 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=95,`Updated`=1 WHERE `CategoryID`=47 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=97,`Updated`=1 WHERE `CategoryID`=49 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=99,`Updated`=1 WHERE `CategoryID`=51 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=101,`Updated`=1 WHERE `CategoryID`=53 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=103,`Updated`=1 WHERE `CategoryID`=111 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=105,`Updated`=1 WHERE `CategoryID`=159 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=107,`Updated`=1 WHERE `CategoryID`=55 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=109,`Updated`=1 WHERE `CategoryID`=161 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=111,`Updated`=1 WHERE `CategoryID`=165 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=113,`Updated`=1 WHERE `CategoryID`=97 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=43,`Updated`=1 WHERE `CategoryID`=17 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=115,`Updated`=1 WHERE `CategoryID`=57 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=117,`Updated`=1 WHERE `CategoryID`=59 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=119,`Updated`=1 WHERE `CategoryID`=61 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=121,`Updated`=1 WHERE `CategoryID`=63 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=123,`Updated`=1 WHERE `CategoryID`=101 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=125,`Updated`=1 WHERE `CategoryID`=115 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=45,`Updated`=1 WHERE `CategoryID`=15 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=47,`Updated`=1 WHERE `CategoryID`=91 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=49,`Updated`=1 WHERE `CategoryID`=201 AND `Updated`=0
UPDATE `icms_art_cat` SET `CategoryID`=51,`Updated`=1 WHERE `CategoryID`=155 AND `Updated`=0

System returns error on 7th update

#1062 - Duplicate entry '794-53' for key 'PRIMARY'

Aucun commentaire:

Enregistrer un commentaire