MySQL Forums
Forum List  »  French

Re: duplicate entry
Posted by: Jean Molliné
Date: November 11, 2010 08:49AM

Ce qu'on peut soupçonner, c'est que les conditions de ta requête UPDATE ne rencontrant aucune correspondance, MySQL effectue alors une insertion automatique, à ce détail près que la clé primaire existe déjà, tu as ce retour de duplication d'une clé unique.

Donc je suggère vivement de vérifier tes conditions de tri. Fais un test avec un SELECT basé sur les mêmes critères :
SELECT position_aElement
FROM composing_architecture
where 
(
  case 
    when @from > 5 then position_aElement between 5 and @from 
    when @from < 5 then position_aElement between @from and 5 
  end
) 
and ref_architecture = 'z63f44ce81' 
order by position_aElement desc;
Si je ne fais pas erreur, il ne devrait revenir aucune ligne.

______________________________________________________________
Une question bien formulée, c'est un problème bien compris : ça représente déjà les 3/4 de la réponse ;)

Options: ReplyQuote


Subject
Views
Written By
Posted
6499
November 04, 2010 02:43PM
2994
November 05, 2010 12:46AM
2430
November 05, 2010 06:53AM
2362
November 05, 2010 07:21AM
2673
November 05, 2010 07:43AM
2643
November 05, 2010 07:58AM
2408
November 05, 2010 08:17AM
2558
November 05, 2010 08:23AM
2392
November 08, 2010 10:53AM
2424
November 08, 2010 11:11AM
3042
November 11, 2010 08:32AM
Re: duplicate entry
2468
November 11, 2010 08:49AM
2406
November 11, 2010 09:05AM
2309
November 11, 2010 11:12AM
2271
November 11, 2010 01:08PM
2353
November 11, 2010 01:12PM
2395
November 14, 2010 11:06AM
2355
November 14, 2010 12:01PM
2427
November 17, 2010 08:01AM
2666
November 17, 2010 08:41AM
2390
November 21, 2010 10:51AM
2306
November 21, 2010 12:30PM


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.