As it stands, there's no way to write a sensible update procedure, because there's no way to identify which record relates to which game.
You'll either have to delete the data for the week, and then insert it again:
ALTER PROCEDURE [dbo].[UpdateTeamRecord]
(
@Week nvarchar(20),
@Game_1_Won nvarchar(20),
@Game_1_Lost nvarchar(20),
@Game_2_Won nvarchar(20),
@Game_2_Lost nvarchar(20),
@Game_3_Won nvarchar(20),
@Game_3_Lost nvarchar(20)
)
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM TeamRecord WHERE Week = @Week;
INSERT INTO TeamRecord(Week, Won, Lost)
VALUES
(@Week, @Game_1_Won, @Game_1_Lost),
(@Week, @Game_2_Won, @Game_2_Lost),
(@Week, @Game_3_Won, @Game_3_Lost)
;
END
Or, sort the rows for the week by ID, and update based on that:
ALTER PROCEDURE [dbo].[UpdateTeamRecord]
(
@Week nvarchar(20),
@Game_1_Won nvarchar(20),
@Game_1_Lost nvarchar(20),
@Game_2_Won nvarchar(20),
@Game_2_Lost nvarchar(20),
@Game_3_Won nvarchar(20),
@Game_3_Lost nvarchar(20)
)
AS
BEGIN
SET NOCOUNT ON;
WITH cteWeekRecords As
(
SELECT
Id,
ROW_NUMBER() OVER (ORDER BY Id) As GameNumber
FROM
TeamRecord
WHERE
Week = @Week
),
cteNewRecords As
(
SELECT
Id,
CASE GameNumber
WHEN 1 THEN @Game_1_Won
WHEN 2 THEN @Game_2_Won
WHEN 3 THEN @Game_3_Won
END As Won,
CASE GameNumber
WHEN 1 THEN @Game_1_Lost
WHEN 2 THEN @Game_2_Lost
WHEN 3 THEN @Game_3_Lost
END As Lost
FROM
cteWeekRecords
WHERE
GameNumber In (1, 2, 3)
)
UPDATE
R
SET
Won = S.Won,
Lost = S.Lost
FROM
TeamRecord As R
INNER JOIN cteNewRecords As S
ON S.Id = R.Id
;
END