Bonjour,
	
	| 12
 3
 4
 5
 6
 7
 8
 
 | DECLARE session_count INTEGER DEFAULT 0; 
DECLARE pourc INTEGER DEFAULT 0; 
 
SELECT COUNT(id) INTO session_count FROM FC_poster F;
 
SET pourc = (session_count * 20) / 100;
 
UPDATE FC_poster F SET access=1 ORDER BY F.dater DESC LIMIT pourc; | 
 Mon soucie, c'est que j'ai ma variable 'pourc' qui me génère une erreur quand je l'utilise pour définir ma LIMIT.
Alors que si je l'utilise : 
	
	UPDATE FC_poster F SET access=pourc ORDER BY F.dater DESC LIMIT 10;
 La variable est bien reconnu à cette place.
Y a t'il des limitations dans l'utilisation d'une variable pour définir le LIMIT?
						
					
Partager