Maybe u will have to maniupulate it a little the way I diddeclare @start_week datetimedeclare @end_week datetimecreate table #tabDates (ID int IDENTITY,StartDate datetime,EndDate datetime,WeekDates varchar(40))declare @iStartDay int,@iNextDay int,@iInitCtr int,@iWeekCtr intSET @iInitCtr=1SET @iWeekCtr =8SET @iStartDay =0SET @iNextDay=6SET @start_week = dateadd(d, 1-DATEPART(dw, getdate()), getdate()) WHILE (@iInitCtr<=@iWeekCtr)BEGININSERT INTO #tabDatesSELECT @start_week+@iStartDay ,@start_week+@iNextDay,NULLSELECT @iInitCtr=@iInitCtr+1,@iStartDay=@iStartDay+7,@iNextDay=@iNextDay+7ENDupdate #tabDates set weekdates=convert(varchar(40),StartDate) + ' ' + convert(varchar(40),EndDate)select * from #tabDatesdeclare @colList varchar(8000)select @colList = coalesce(@colList + ', [' + WeekDates + ']', '[' + WeekDates + ']') from #tabDates group by WeekDatesprint @colListexec('select ' + @colList + 'from (select WeekDates ,id, row_number() over (partition by id order by id) as rn from #tabDates) tpivot (max(id) for WeekDates in (' + @colList + ')) as p') drop table #tabDatesPBUH