HI Try this procedure
CREATE PROCEDURE PROC_GETWEEKNUMBERS
@strtdate datetime,
@enddate datetime
AS
DECLARE @cnt int
DECLARE @i int
SET @i=0
SELECT @cnt= datediff(ww,@strtdate,@enddate)
DECLARE @WeekNumbers Table(weeknumber int)
DECLARE @wknum int
SELECT @wknum=Datepart(Wk,@strtdate)
SELECT @strtdate=Dateadd(dd,1,@strtdate)
WHILE(@i < @CNT)
BEGIN
Insert into @WeekNumbers(weeknumber)...