Hi There
I am trying to insert some records into a database for budgeting purposes. A
record needs to be inserted for each week.
My query so far looks like this
while [date] between '2005-09-05 00:00:00' and '2006-07-01 00:00:00'
begin
insert into dbo.tbl_budgets ([Date], entity, entity_type, sub_catagory,
amount) values(x, 2, 1, 1, 1375000)
how do i make the x add 7 days to each record?
so output should be
05/09/2005, 2, 1, 1, 1375000
12/09/2005, 2, 1, 1, 1375000
19/09/2005, 2, 1, 1, 1375000
26/09/2005, 2, 1, 1, 1375000
etc etc
Thanks