Re: [SQL] I need to fill up a sparse table in an view

2013-03-02 Thread Victor Yegorov
2013/3/2 Andreas > So the table looks like. > my_numbers ( object_id int, month int, some_nr int ) > > ( 17, 201301, 123 ), > ( 42, 201301, 456 ), > ( 42, 201303, 789 ), > > Now I need a view that fills the gaps up till the current month. > > > ( 17, 201301, 123 ), > ( 17, 201302, 123 ), <--

[SQL] I need to fill up a sparse table in an view

2013-03-02 Thread Andreas
Hi, I need to fill up a sparse table in an view. The table holds some numbers relating months and objects. The month is an integer in the format MM. To make it more convenient to manage this table I decidet to let a value be good till the next entry. E.g. if there is an entry in january and