I have a calendar table that shows all dates from 01/01/2015 to 12/31/2016, essentially the calendar shows the date and isworkday. I need to be able to pass a begindate and enddate to a stored procedure and insert all the dates that are in the range in a table. So for example something like this
Create Procedure [dbo].[DateRangeTest]
(
@begindate date
,@enddate date
)
As
Set @begindate = '01/01/2016'
Set @enddate = '01/31/2016'
Now here is where my lack of knowledge comes to play, how can I then take all the dates in that range that are flagged as workdays from my workcalendar table and insert those specific dates into a temp table?