Hello,
i have the following table:
CREATE TABLE [dbo].[fill_up]( [date] [date] NULL, [value] [numeric](2, 1) NULL ) ON [PRIMARY] GO INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x94360B00 AS Date), CAST(1.0 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x96360B00 AS Date), CAST(1.8 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x9A360B00 AS Date), CAST(2.5 AS Numeric(2, 1)))
I'm searching for a sql statement which fills up the missing dates. Afterwards it have to look like this:
CREATE TABLE [dbo].[fill_up]( [date] [date] NULL, [value] [numeric](2, 1) NULL ) ON [PRIMARY] GO INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x94360B00 AS Date), CAST(1.0 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x96360B00 AS Date), CAST(1.8 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x9A360B00 AS Date), CAST(2.5 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x95360B00 AS Date), CAST(1.0 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x97360B00 AS Date), CAST(1.8 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x98360B00 AS Date), CAST(1.8 AS Numeric(2, 1))) INSERT [dbo].[fill_up] ([date], [value]) VALUES (CAST(0x99360B00 AS Date), CAST(1.8 AS Numeric(2, 1)))
Do you have any suggestion how i can realize this?
Many thanks in advance.
regards zerosonic