I'm newbe to Sqlserver.
I'm trying to go through a table using a cursor along with using variables to come up with two grand totals. There are about 5 record that match the criteria of the cursor. I can view the individual rows values but when i try to utilize adding it to itself to have a grand total variable its passing me a null value. Can anyone tell me what i'm doing from. It it looks like it would total the values up but its not.

OPEN cursorPur
FETCH NEXT FROM cursorPur into @strCUSTID,@strCUSTNAME,
@strCITY,@strSTATE,@dtORDDT,@intQTY,@decDISC,@decU PRICE
WHILE @@FETCH_STATUS = 0
BEGIN
SET @decTOTPAID = @decTOTPAID + ((@intQTY * @decUPRICE) - @decDISC)
SET @intTOTQTY = @intTOTQTY + @intQTY
FETCH NEXT FROM cursorPur into @strCUSTID, @strCUSTNAME,
@strCITY, @strSTATE, @dtORDDT, @intQTY, @decDISC,@decUPRICE
END
SELECT @strCUSTID AS CUSTID,
@strCUSTNAME AS strCUSTNAME,
@strCITY AS strCITY,
@strSTATE AS strSTATE,
@decTOTPAID AS TOTPAID,
@intTOTQTY AS TOTALQTY
CLOSE cursorPur
DEALLOCATE cursorPur