I have a Table with the following Fields:
----------------------------------------
| Start Date | Recurrences |
----------------------------------------
| 01-01-2015 | 12 |
----------------------------------------
| 01-06-2015 | 10 |
----------------------------------------
What I need to output is a total of 22 rows (12 + 10). Each row should contain the 'Start Date' field plus the increment of days depending on which recurrence.
I was able to generate a number of rows with an increment using this table of SQL Server:
SELECT
DISTINCT n = number
FROM
master..[spt_values]
WHERE
number BETWEEN 1 AND 1000
But what I need is to trigger this select per each row of my table and set the MAX to Recurrences field and not to 1000