Hi everyone,
I need to sum the num of locations for each successful mission per name. Seems easy enough but I'm missing something. I need data from two other tables which are joined with left outer joins. Instead of getting the sum for num of locations for each distinct missionID, I get the sum for num of locations for each instance of missionID.
Here is what I see from my sql query:
Date(1st grp) name(2nd) missionID locs success
09/12/02 Roy 091202001 2 1
09/12/02 Roy 091202001 2 1
09/12/02 Roy 091202002 1 1
09/12/02 Roy 091202003 4 1
09/12/02 Ruth 091202004 1 0
09/12/02 Ruth 091202005 3 1
This is what I'm getting in my report:
09/12/02 Roy 9
09/12/02 Ruth 3
This is what I'm supposed to get:
09/12/02 Roy 7
09/12/02 Ruth 3
I used a running total, summing on the num of locations, evaluating on mission success = 1 and reseting on change of group. I know I need to add an additional qualifier of distinct missionID but I'm blanking on how to do it. I'd prefer to my summing with variables due to past issues with running totals in our apps but I seem to be suffering from brain fade today and fighting a losing battle.
Thanks for all your help,
Jacque
I need to sum the num of locations for each successful mission per name. Seems easy enough but I'm missing something. I need data from two other tables which are joined with left outer joins. Instead of getting the sum for num of locations for each distinct missionID, I get the sum for num of locations for each instance of missionID.
Here is what I see from my sql query:
Date(1st grp) name(2nd) missionID locs success
09/12/02 Roy 091202001 2 1
09/12/02 Roy 091202001 2 1
09/12/02 Roy 091202002 1 1
09/12/02 Roy 091202003 4 1
09/12/02 Ruth 091202004 1 0
09/12/02 Ruth 091202005 3 1
This is what I'm getting in my report:
09/12/02 Roy 9
09/12/02 Ruth 3
This is what I'm supposed to get:
09/12/02 Roy 7
09/12/02 Ruth 3
I used a running total, summing on the num of locations, evaluating on mission success = 1 and reseting on change of group. I know I need to add an additional qualifier of distinct missionID but I'm blanking on how to do it. I'd prefer to my summing with variables due to past issues with running totals in our apps but I seem to be suffering from brain fade today and fighting a losing battle.
Thanks for all your help,
Jacque