Last active
April 28, 2019 20:20
-
-
Save syedhassaanahmed/b247acc579b3add2903c107f4b63e60d to your computer and use it in GitHub Desktop.
Generate comma separated integer days for SQL Server Partition Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let endDate = datetime(2019-04-28); | |
range day from endDate - 120d to endDate step 1d | |
| summarize days = makelist(replace("-", "", substring(day, 0, 10))) | |
| project array_strcat(days, ", ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of above query is