I have here a date range from
"1/27/2014" - Start
"1/31/2014" - End
Note:
On Figure 1 - that is the data from SQL
On Figure 2 - that is how I want may data to be extracted
How can I do this using SQL query?
Is this possible?
I have here a date range from
"1/27/2014" - Start
"1/31/2014" - End
Note:
On Figure 1 - that is the data from SQL
On Figure 2 - that is how I want may data to be extracted
How can I do this using SQL query?
Is this possible?
DECLARE @startDate DATE
DECLARE @endDate DATE
SET @startDate = '1/27/2014'
SET @endDate = '1/31/2014'
;WITH dates AS
(
SELECT @startdate as Date
UNION ALL
SELECT DATEADD(d,1,[Date])
FROM dates
WHERE DATE < @enddate
)
SELECT Date from dates