SQL Server 날짜함수

올해 일자별 주(WEEK)차시 정보

SELECT a.num
    ,DATEADD(DAY,a.num-1,'20190101') AS ymd
    ,DATEPART(WEEK,DATEADD(DAY,a.num-1,'20190101')) AS week_no
FROM (
SELECT ROW_NUMBER() OVER (ORDER BY column_name ) AS num
FROM information_schema.columns
) a
WHERE a.num < 366
;