Special query on SQL Server 2005
Posted on 2013-12-24
I have a table T like this
In fact, this table contains closing dates of my customer's company.
For example, this table currently contains
2013-12-24 2013-12-24 From 12 AM
2013-12-25 2014-01-02 Christmas bridge
I need to write a stored procedure that will receive as parameter a date (in fact a month), like '2013-12' and that will be able to return all closing dates and corresponding text, example for 2013-12 is :
2013-12-24 From 12 AM
2013-12-25 Christmas bridge
2013-12-26 Christmas bridge
2013-12-27 Christmas bridge
2013-12-28 Christmas bridge
2013-12-29 Christmas bridge
2013-12-30 Christmas bridge
2013-12-31 Christmas bridge
Is there a way to return this kind of dataset without creating a temporary table ?
Is a kind of view needed ?