i am trying to produce a query which gets something like this
Code:
01-12-04   4
01-12-04   3
03-12-04   9
and returns something like this
Code:
01-12-04   7
02-12-04   0
03-12-04   9
but the closest i can get is this
Code:
01-12-04   7
03-12-04   9
by grouping the dates together (in a really messy way* i might add) and then getting the sum for that day

*currently i am getting the year, month and day components of a date, casting them to varchars and sticking a '-' between them.. if anyone knows a better way of grouping these (preferably into some displayable format too) please tell me!

does anyone have any idea how i would go about achieving what i need? would i need to find the earliest date and loop dateadd until it gets to getdate(), running a query for each date or what?