same issues remain...run and test your code, don't just change one thing and re-post it..
test test test!
Lowell (4/4/2013)
ok then, here's two hints:1. your final SELECT belongs outside of the loop, not inside.
still an issue. find your END, move your last SELECT after it.
2. your final SELECT command with the Department and SUM() should not reference any @variables whatsoever.
if you fix that, your existing code will work.
still an issue. SUM(@Fees)
Lowell