 UPDATE avenant_temp A
        LEFT JOIN 
        (
		SELECT
			`user`,
			SUM(IFNULL(nbAdherent*primeNette,"0")) 		AS primeNette, 
			SUM(IFNULL(nbAdherent*primeNetteStat,"0"))	AS primeNetteStat, 
			SUM(IFNULL(nbAdherent*accessoire,"0"))		AS accessoire, 
			SUM(IFNULL(nbAdherent*primeHt,"0"))		AS primeHt, 
			SUM(IFNULL(nbAdherent*taxe,"0")) 		AS taxe, 
			SUM(IFNULL(nbAdherent*primeTtc,"0")) 		AS primeTtc, 
			SUM(IFNULL(nbAdherent,"0"))			AS nbAdherent, 
			SUM(IFNULL(nbAdherent,"0"))			AS nbAliment,
			SUM(IFNULL(nbAdherent*cumulPlafond,"0")) 	AS cumulPlafond
		FROM college_temp WHERE (`user`=p_user)
		
	) B ON (B.user=A.user)
        SET 
		A.primeNette		= IFNULL(B.primeNette,"0"), 
		A.primeNetteStat	= IFNULL(B.primeNetteStat,"0"), 
		A.accessoire		= IFNULL(B.accessoire,"0"), 
		A.primeHt		= IFNULL(B.primeHt,"0"), 
		A.taxe			= IFNULL(B.taxe,"0"), 
		A.primeTtcInitial	= IFNULL(B.primeTtc,"0"), 
		A.primeTtc		= IFNULL(B.primeTtc,"0"), 
		A.nbAliment		= IFNULL( B.nbAliment,"0"), 
		A.nbAdherent		= IFNULL( B.nbAdherent,"0"), 
		A.cumulPlafond		= IFNULL(B.cumulPlafond,"0")		
	WHERE (A.user=p_user);
	SELECT A.accessoire, A.* FROM avenant_temp A;