Springboot, Mybatis :: ๋ถ๋ฑํธ, ๋น๊ต์ฐ์ฐ์ ์ฌ์ฉ ๋ฐฉ๋ฒ
1
2024.02.02
์ฟผ๋ฆฌ๋ฌธ์ ์์ฑํ๋ค๋ณด๋ฉด ๋น๊ต๋ฌธ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๊ฐ ์๊ธฐ๋๋ฐ.. ๋ง์ด๋ฐํฐ์ค์์๋ , WITH CTE(WorkDate) AS ( SELECT CONVERT ( DATE, #{Year}+'-01-01') UNION ALL SELECT DATEADD(d, 1, WorkDate) FROM CTE WHERE WorkDate (CONVERT(DATE, #{Year}+'-12-31')) ) SELECT * FROM CTE OPTION ( MAXRECURSION 0 ); ๋. WITH CTE(WorkDate) AS ( SELECT CONVERT ( DATE, #{Year}+'-01-01') UNION ALL SELECT DATEADD(d, 1, WorkDate) FROM CTE WHERE ) SELECT * FROM CTE..