something like this:declare @t table (id int, date_time datetime, [length] int, Interval_Num int)insert into @t (id, date_time, [length], Interval_Num) values(1, '10/11/2014 9:00', 420, 14);with N0(n) as (select 1 from (values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) n(n)), N1(n) as (select 1 from N0, N0 N), N2(n) as (select 1 from N1, N1 N), N(n) as (select row_number() over(order by (select null)) from N2)select id, date_time, c.interval, 30from @tcross apply ( select dateadd(minute, 30*(n-1), date_time) from N where n < Interval_Num ) c(interval)