{"provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/kwbtblog/","width":"100%","url":"https://www.ekwbtblog.com/entry/2019/06/27/003656","version":"1.0","blog_url":"https://www.ekwbtblog.com/","categories":["Azure","MSSQL","SQL","SQL Database","SQL Server","data analysis"],"image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/k/kwbtblog/20190627/20190627001546.png","type":"rich","description":"I wanted a calendar table in SQL Server (Azure SQL Database), so here is a memo on how to create one. I googled, and it seems to be created by creating a table with \"WITH\" and then making a recursive call from \"UNION ALL\" in the table definition. WITH _calendar AS ( SELECT CAST(N'2019-01-01' AS DATE\u2026","title":"How to create a calendar table in SQL Server","published":"2019-06-27 00:36:56","author_name":"kwbtblog","provider_name":"Hatena Blog","blog_title":"Welcome to new things","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.ekwbtblog.com%2Fentry%2F2019%2F06%2F27%2F003656\" title=\"How to create a calendar table in SQL Server - Welcome to new things\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}