Sql aidezzzzzzzzzzzzzzzzzz moi

hindia Messages postés 24 Statut Membre -  
Lolo38Lolo Messages postés 215 Statut Membre -
slt tt le monde chui nouvelle o forum alours j éspere ke vv puissez m aider pour ma 1 participation
alors j ai le code suivant
/*************************************************************************************************************/
create proc iman @numproj int
as
declare @numpro int,@qte int,@nomfou varchar(50)
declare cr cursor for select a.numpro,qte from produit p,Affectation a where a.numpro=p.numpro and Numproj= @numProj
fetch next from cr into @numpro,@qte
open cr
while @@fetch_status=0
begin
print
+@numpro+'est'+@qte
declare cg cursor for
select nomFou from affectation a,Fournisseur F where a.numfou=f.numfou
and numpro=@numpro and numproj <>@numProj
fetch next from cg into @nomfou
open cr
while @@fetch_status=0
print
+@nomfou
fetch next from cr into @numpro,@qte
end
close cr
deallocate cr
fetch next from cg into @nomfou
close cg
deallocate cg
exec iman 654
/*********************************************************************************************************/
mais le prob c ke j ai toujours ces erreur
Server: Msg 16917, Level 16, State 2, Procedure iman, Line 5
Le curseur n'est pas ouvert.
Server: Msg 16916, Level 16, State 1, Procedure iman, Line 23
Un curseur nommé 'cg' n'existe pas.
Server: Msg 16916, Level 16, State 1, Procedure iman, Line 24
Un curseur nommé 'cg' n'existe pas.
Server: Msg 16916, Level 16, State 1, Procedure iman, Line 25
Un curseur nommé 'cg' n'existe pas.





plz plz plz aaidez moi j ai 1 exam la semaine prochaine
é miciiiiiiiiiiiiiiiiiiiiiiiii
A voir également:

1 réponse

Lolo38Lolo Messages postés 215 Statut Membre 22
 
declare cg cursor for
select nomFou from affectation a,Fournisseur F where a.numfou=f.numfou
and numpro=@numpro and numproj <>@numProj
fetch next from cg into @nomfou
open cr
while @@fetch_status=0

ça serait pas open cg ?
0