You have a table with the date and the amount and need to show the amount increase by 4% from month to month.
Enter the following SQL query:
SET @cnt = 0; SET @date = (SELECT T1.'Date' FROM T1); SET @amount = (SELECT T1.'Amount' FROM T1); WHILE @cnt < 11 BEGIN SET @cnt = @cnt + 1; SET @date = DATEADD(month, 1, @date); SET @amount = @amount * 1.04; INSERT INTO T1 (T1.'Date', T1.'Amount') VALUES (@date, @amount); END; SELECT * FROM T1 |
Save the macro and the page.