views:

38

answers:

1

Hi,

I want to generate a temp table having following columns:

  • WeekNO
  • StartDate
  • EndDate

using an UDF having a year parameter (YEAR(YYYY)).

+2  A: 

Why should I consider using an auxiliary calendar table?

onedaywhen
Excellent advice, +1. Might edit the answer to show how the OP's temp table is then filled by one simple select (or not needed at all).
Brock Adams