Simple Join Question... SQL Server
I have a table that has a running total, that looks like this:
PROJECT# / MONTH&YEAR / SPEND / CUMULATIVE SPEND
In this table, I ran across a problem where if the spend was 0 in a particular month, the cumulative spend for that project would not come across...
So, in order to remedy this, I created a table that contains all project #'s and all months&yr combos...
I wanted to join this to my original table so that every project# had a record for every single month...
But this isn't happening, I tried the left, right, inner, cross, outer...
Any ideas / suggestions?Thanks
I've tried it like this, and it seems to work:
Here's some sample code to show the idea:
And here's the output:
answered Aug 10 '12 at 07:45 PM
Figured it out, I'm using a UNION to add those rows where the DATE is not equal...
answered Aug 10 '12 at 07:03 PM