Here's one way to do it in 2005... The neat thing is it doesn't use any RBAR or a sequence table. You could use UPDATE and OUTPUT to return things to the GUI if necessary.
--===== Create a test table to demonstrate with
CREATE TABLE DateTest
(RowNum INT IDENTITY(1,1),
DateCreated DATETIME)
--===== Fill it with a bunch of dated rows
INSERT INTO DateTest
(DateCreated)
SELECT DATEADD(hh,t.n-1,'20000101')
FROM Tally t
--===== Demo the generation of the required numbers
SELECT *,
REPLACE(STR(DATENAME(wk,dt.DateCreated),2) + '-'
+ RIGHT(DATENAME(yy,dt.DateCreated),1),' ','0') + '-'
+ REPLACE(STR(
ROW_NUMBER() OVER
(PARTITION BY STR(DATENAME(wk,dt.DateCreated),2)
+ RIGHT(DATENAME(yy,dt.DateCreated),1)
ORDER BY dt.RowNum),5),' ','0') AS [Wk-Y-NNNNN]
FROM DateTest dt
ORDER BY ROWNUM
--Jeff Moden
Change is inevitable... Change for the better is not.