참조 : http://ddoung2.tistory.com/186?srchid=BR1http://ddoung2.tistory.com/186 년월만 필요할 때, select convert(char(6),dateadd(mm,number,'2010-01-01'),112) yearmonth from master..spt_values where type = 'P' and convert(char(6),dateadd(mm,number,'2010-01-01'),112)<'2011' 년월일이 다 필요하면 select convert(char(8),dateadd(d,number,'2010-01-01'),112) yearmonthday from master..