First create a calendar table or numbers table if you don't already have one in your database. You can create one like this:CREATE TABLE #N(n INT NOT NULL PRIMARY KEY CLUSTERED);;WITH cte AS (SELECT 1 AS n UNION ALL SELECT n+1 FROM cte WHERE n < 100)INSERT INTO #N SELECT n FROM cte;
Now query against the numbers table to get the days on which the event has to occur:DECLARE @IntervalDays INT; SET @IntervalDays = 2;DECLARE @Occurrences INT; SET @Occurrences = 5;DECLARE @startDate DATETIME; SET @startDate = '20120507';SELECT DATEADD(dd,(n-1)*@IntervalDays,@startDate)FROM #NWHERE n <= @Occurrences