fonction "variable doit etre declare"
	
	
		Salut,
Voila ma fonction, et il me gueule :
**erreur 137: la variable '@NomTable' doit etre declaree
ca doit etre tt bete, mais bon si qqun a la reponse.
merci d'avance.
	Code:
	
1 2 3 4 5 6 7 8 9 10 11 12 13
   |  
CREATE FUNCTION NB_OP(@NomTable nvarchar(50), @op nvarchar(50), @ES nvarchar(50)) RETURNS int
AS  
 
BEGIN 
 
return(select count(*)
from @NomTable
where @ES in(select entrant from Les_Routes where operateur = @op)
and Point_Sémaphore in(select ps from points_semaphores)
and cause_code <> 255)
 
END  |