A
abstract_daze
I have a table with the following:
Id Name amount Date
1 JOHN SMITH 10.00 8/1/2006
2 JOHN SMITH 20.00 8/5/2006
3 MARY JONES 50.00 5/5/2006
4 MARK LONG 25.00 4/4/2006
5 MARK LONG 5.00 5/8/2006
I WOULD LIKE THE SQL RESULTS TO LOOK LIKE THIS:
NAME AMOUNT(SUM) ID1 ID2
JOHN SMITH 30.00 1 2
MARY JONES 50.00 3
MARK LONG 30.00 4 5
How can I accomplish this - I am most concerned in
getting the NAME & SUM fields but if I could get the IDs
on the same row that would be great!
Any help is greatly appreciated!
Id Name amount Date
1 JOHN SMITH 10.00 8/1/2006
2 JOHN SMITH 20.00 8/5/2006
3 MARY JONES 50.00 5/5/2006
4 MARK LONG 25.00 4/4/2006
5 MARK LONG 5.00 5/8/2006
I WOULD LIKE THE SQL RESULTS TO LOOK LIKE THIS:
NAME AMOUNT(SUM) ID1 ID2
JOHN SMITH 30.00 1 2
MARY JONES 50.00 3
MARK LONG 30.00 4 5
How can I accomplish this - I am most concerned in
getting the NAME & SUM fields but if I could get the IDs
on the same row that would be great!
Any help is greatly appreciated!