Lista de dias del mes con SQL Server

Autor: Rafal Skotak http://www.sqlservercentral.com/scripts/61949/ Select dt_val from ( –Matriz cruzada de valores numericos select dateadd(dd, value, dateadd(month, 8 – 1, dateadd(year, 2008 – 1900, ‘1900.01.01 00:00:00.000’))) as dt_val from( select (v2 * 4 + v1) * 4 + v0 as value from (select 0 as v0 union select 1 union select 2 union select 3) …