Can I write a stored procedure that does INSERTs into the resultset of the stored procedure instead of having to use a temp table and then doing a SELECT of the records in that temp table ?
Specifically I need to return a resultset containing datetime values from a range of dates, but omitting weekend days and holidays where holidays are defined in a table in the database.
Right now there is a WHILE loop that INSERTs into a temp table and then at the end of the stored procedure there is this
SELECT * FROM #TEMPTABLE DROP TABLE #TEMPTABLE