|
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
(comments are locked)
|
|
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: Thanks, this is much nicer than the solution I had created - as always, your help is appreciated!
Aug 10 '12 at 09:07 PM
TelepathicSheep2
(comments are locked)
|
|
Figured it out, I'm using a UNION to add those rows where the DATE is not equal...
(comments are locked)
|

