something like
declare @d datetime
select @d = '20030101'
while @d < '20040101'
begin
select dateadd(ww,2,dateadd(dd,(9-datepart(dw,@d))%7, @d))
select @d = dateadd(mm,1,@d)
end
Cursors never.
DTS - only when needed and never to control.
Cursors never.
DTS - only when needed and never to control.