Microsoft SQL ServerGenerating a range of dates


Parameters

ParameterDetails
@FromDateThe inclusive lower boundary of the generated date range.
@ToDateThe inclusive upper boundary of the generated date range.

Remarks

Most experts seem to recommend creating a Dates table instead of generating a sequence on the fly. See http://dba.stackexchange.com/questions/86435/filling-in-date-holes-in-grouped-by-date-sql-data