Tomaz.tsql

Browse by Tags

All Tags » datetime (RSS)
DateTime Tally Table
Five ways to generate Date Tally Table: -- 1. way ;create table tc..dt (id int identity(1,1) ,dt datetime) insert into dt(dt) select a.dt+b.number as dt from (select cast('2010/12/31' as datetime) as dt ) as a cross join master..spt_values as...