Leave Blanks In A Query

Dominato

Registered User.
Local time
Today, 17:26
Joined
Apr 10, 2002
Messages
19
Ok, this is fairly complex so I'll try to be specific as possible. Here is what I currently have.

SELECT [C_TS1].[Year-Month], [C_TS1].Classification, [C_TS1].[SumOfActual], Sum([C_TS1_1].[SumOfActual]) AS ActualRunSum, [C_TS1].[SumOfBudget], Sum([C_TS1_1].[SumOfBudget]) AS BudgetRunSum, [C_TS1].[SumOfRevised Budget], Sum([C_TS1_1].[SumOfRevised Budget]) AS RevisedRunSum
FROM C_TS1 INNER JOIN C_TS1 AS C_TS1_1 ON [C_TS1].[Year-Month] >=[C_TS1_1].[Year-Month]
GROUP BY [C_TS1].[Year-Month], [C_TS1].[Classification], [C_TS1].[SumOfActual], [C_TS1].[SumOfBudget], [C_TS1].[SumOfRevised Budget];

What that does basically is calculate a running sum of 3 columns. Currently, if a column has a null value, the running sum treats it like a zero. I want it to leave a blank instead. For example:

# means no data
Currently it is:
1 1
2 3
3 6
4 10
# 10

I want:
1 1
2 3
3 6
4 10
# #

Hope that makes sense. Thanks in advance. (I should mention that there are 3 sets of the above rows I gave in the example, so I can't just chop off the whole row because one of the other columns may have a number in the last row)

[This message has been edited by Dominato (edited 04-24-2002).]
 
A REALLY did a BS job using multiple queries, but I got it to work so all is good. =-D
 

Users who are viewing this thread

Back
Top Bottom