Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update database won't work

Author  Topic 

Michael71
Posting Yak Master

126 Posts

Posted - 2006-10-13 : 16:38:51
Hey Guys,

Could some help me out an tell me why this wont run.

I think I got an error at the bottom


USE InfoPathBudget
GO
UPDATE TOSS
SET ytdexpenses = SUM(monthlyExpenses)
SET ytdBudgeted = SUM(monthlyBudgeted)
SET ytdCapitalExpenses = SUM(monthlyCapitalExpenses)
SET ytdCapitalBudgeted = SUM(monthlyCapitalBudgeted)


I got this when I ran it
Server: Msg 157, Level 15, State 1, Line 2
An aggregate may not appear in the set list of an UPDATE statement.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-10-13 : 16:42:41
Duplicate:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73499

Tara Kizer
Go to Top of Page
   

- Advertisement -