Here is one way of doing it. Maybe there is also a nice way of doing it using recursive CTE:-)
create table TimeTable (dt datetime)
insert into TimeTable (dt) values ('20000101')
declare @Interval int
set @Interval = 15
--In the loop I muliply the value of @interval each time, and then I use it
--to add it to the value of dt column of all records in the table.
while not exists (select * from TimeTable where dt >= '20291231 23:45:00')
begin
insert into TimeTable (dt)
select DATEADD(mi,@Interval,dt)
from TimeTable
where DATEADD(mi,@Interval,dt) < '20300101'
select @Interval = @Interval * 2
end
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/