select dateadd(dd,number,'2012-1-1') AS date from master..spt_values where type='p' and dateadd(dd,number,'2012-1-1')<='2012-12-30'
select dateadd(dd,number,'2012-1-1') AS date from master..spt_values where type='p' and dateadd(dd,number,'2012-1-1')<='2012-12-30'