I would really, really appreciate if somebody could help me to solve this by posting a complete query, I am soo stuck...
I have a table "Mydb.MyTable" with fields like (Swedish date format):
MyDate MyPartNo MyValue
2017-10-01 A01 10
2017-10-02 A01 -3
2017-10-05 A01 6
2017-10-01 BX4 12
2017-10-06 BX4 -2
What I want to achieve is a table with all dates from the first to the last date. For each date that is "missing" for a part, I want to use the last known value. So I would like the result of the above table to look like this:
MyDate MyPartNo MyValue
2017-10-01 A01 10
2017-10-02 A01 -3
2017-10-03 A01 -3
2017-10-04 A01 -3
2017-10-05 A01 6
2017-10-01 BX4 12
2017-10-02 BX4 12
2017-10-03 BX4 12
2017-10-04 BX4 12
2017-10-05 BX4 12
2017-10-06 BX4 -2
The query doesn't need to find the first and last dates.
If it helps, I also have a table for dates "Mydb.CALENDAR".