Getting Dates In Range Into Table
Guessing at column names:

INSERT #temp(dateColumn) 
  SELECT dateColumn
  FROM dbo.WorkCalendar
  WHERE IsWorkDay = 1
  AND dateColumn &gt;= @begindate
  AND dateColumn &lt; DATEADD(DAY, 1, @enddate);


Also please try to avoid regional formats like m/d/y. These will bite you in the end, because someone will run your code on a server with different language or regional settings, and it will be interpreted as d/m/y. See Bad habits to kick : mis-handling date / range queries. Also, for information on why I didn't use BETWEEN, see What do BETWEEN and the devil have in common? It may work for the date data type, but I'd rather be consistent than surprised.