DECLARE @startdate DATETIME ,@enddate DATETIME; SET @startdate = '2016-03-06'; SET @enddate = '2016-03-20'; WITH calendardates AS ( SELECT date1 = @startdate UNION ALL SELECT DATEADD(DAY, 1, date1) FROM calendardates WHERE DATEADD(DAY, 1, date1) <= @enddate ) Select c.date1,[declared_at],[branch],[Day_Time2],[Shop_Time],[Shop_Time_Declared_At],[Store_Close_Time] from [Bank_Activity_Declared_At_Time] BA right JOIN calendardates c ON DATEADD(dd, 0, DATEDIFF(dd, 0, BA.declared_at)) = c.date1 where branch = 227 and declared_at >='2016-03-06' and declared_at <= '2016-03-20'
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE