Recursive CTE to Calculate Dates for the Last 30 Days
Have you ever needed to generate a list of dates for the last 30 days. There are lots of different ways to do this with TSQL, but one way is with a recursive CTE. You can then left join against it with another query to generate a list of all dates in a result set, along with the dates for …
Recursive CTE to Calculate Dates for the Last 30 Days Read more »