Home Forums SQL Server 2005 T-SQL (SS2K5) I need answer for this can anyone help me with this RE: I need answer for this can anyone help me with this

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!