J
Jim
I have a table that has PersonID and AmountOfMoney
eg
1 1000
2 12000
3 1500
3 2500
4 5000
4 4000
....
I want to group by to find out how much money each person has, which
is easy.
The difficult part is as follows:
I have another table as such, with 4 columns (col1rKey, col2:text,
col3 and col4:longint)
RangeID Description Min Max
1 0 - 5000 0 5000
2 5001 - 10000 5001 10000
3 10001 - 20000 10001 20000
I need a query that will give me the following output
PersonID RangeID
1 1
2 3
3 1
4 2
ie sums up the amount each person has and assigns a range to it.
I hope I've explained my problem well. I am struggling. Can anyone
help? (I'd rather not use VBA for this; just a couple of SQL
statements if possible)
Thanks
Jim
eg
1 1000
2 12000
3 1500
3 2500
4 5000
4 4000
....
I want to group by to find out how much money each person has, which
is easy.
The difficult part is as follows:
I have another table as such, with 4 columns (col1rKey, col2:text,
col3 and col4:longint)
RangeID Description Min Max
1 0 - 5000 0 5000
2 5001 - 10000 5001 10000
3 10001 - 20000 10001 20000
I need a query that will give me the following output
PersonID RangeID
1 1
2 3
3 1
4 2
ie sums up the amount each person has and assigns a range to it.
I hope I've explained my problem well. I am struggling. Can anyone
help? (I'd rather not use VBA for this; just a couple of SQL
statements if possible)
Thanks
Jim