[SQL2000] Manque adregat liste def Update
Bonjour a tous,
j'ai un problème avec la requette suivante
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
update tblbible_bib
set bib_costcumulusd=sum(bib2.BIB_CostMensuelUsd)
from tblbible_BIB BIB
left outer join tblbible_BIB BIB2
on BIB2.BIB_GL = BIB.BIB_GL
and BIB2.BIB_costcenter = BIB.BIB_costcenter
and bib2.BIB_Year = BIB.BIB_Year
and BIB2.Bib_Month <= BIB.BIB_Month
Where BIB.BIB_Closed = 0 or BIB.BIB_Closed is null
group by bib.bib_gl,bib.bib_costcenter |
le serveur SQL me répond :
Il manque un agrégat dans la liste de définition d'une instruction UPDATE.
par contre si je fais une requette select
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| select bib.bib_gl,bib.bib_costcenter,sum(bib2.BIB_CostMensuelUsd)
from tblbible_BIB BIB
left outer join tblbible_BIB BIB2
on BIB2.BIB_GL = BIB.BIB_GL
and BIB2.BIB_costcenter = BIB.BIB_costcenter
and bib2.BIB_Year = BIB.BIB_Year
and BIB2.Bib_Month <= BIB.BIB_Month
Where BIB.BIB_Closed = 0 or BIB.BIB_Closed is null
group by bib.bib_gl,bib.bib_costcenter |
qui marche parfaitement et me donne un bon résultat
Je ne sais pas comment faire la requette pour la mise à jour
Merci pour votre aide