
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sparsely populated field
I have a table with the following data
OpsEntityKey | OpsBalance | OpsShareDate |
010001-227 | 56255 | 5/28/2015 |
010005-227 | 652000 | 5/28/2015 |
010007-316 | 65522 | 5/28/2015 |
010007-353 | 88820 | 5/28/2015 |
010001-227 | 1000000.00 | 5/29/2015 |
010005-227 | 3500000.00 | 5/29/2015 |
010007-316 | 2500000.00 | 5/29/2015 |
010007-353 | 33967452.00 | 5/29/2015 |
010001-227 | 1000000.00 | 6/1/2015 |
010005-227 | 3500000.00 | 6/1/2015 |
010007-316 | 2500000.00 | 6/1/2015 |
010007-353 | 33967452.00 | 6/1/2015 |
What I would like to do is "fill in" the missing dates for 5/30 and 5/31 with the previous balance amounts (this should apply to any dates which are missing). I found this thread which could work for this:
How to populate a sparsely populated field
However, I am having trouble getting this to work with the three columns since the date ranges can be different depending on the Entity Key. The only thing I can think of is doing a loop and filtering the data by entity key, creating the temp tables with just the balance and date, and then doing the join, populating this into a temp table, and finally concatenating the next set of data to the end.
Just wondering if there is a more efficient way of doing this? Any help is appreciated.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be able to do this analog to what I've demonstrated here:
Analogy should be EntityKey <-> Currency, OpsBalance <-> Rate


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should be able to do this analog to what I've demonstrated here:
Analogy should be EntityKey <-> Currency, OpsBalance <-> Rate

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This worked! Thanks for help
