CREATE PROC [dbo].[sp_SetLabelValues]
(
	@srcSurfaceId INT --= 3098
)
AS

DECLARE @srcItemId INT

SELECT	I.recId
INTO	#TempItemList
FROM	pal_SurfaceItem I
WHERE	I.surfaceId = @srcSurfaceId

WHILE (SELECT COUNT(1) FROM #TempItemList) > 0
BEGIN
	SELECT @srcItemId = recId FROM #TempItemList
	DELETE FROM #TempItemList WHERE	recId = @srcItemId

	EXEC sp_SetItemLabelValues @srcItemId,@srcSurfaceId	 
END

DROP TABLE #TempItemList