I am trying to generate a set of rows for a matrix but the @xcolcount
only does on loop staying at zero while the inner loop does what it needs to:
Declare @xColCount int
Declare @yRowCount int
set @xColCount = 0
set @yRowCount = 0
WHILE (@xColCount < @widthCol)
BEGIN
WHILE (@yRowCount < @heightRow)
BEGIN
-- do the insert
INSERT
INTO Scenario.MapCell(Guid, Map, Col, ColAplha, Row)
VALUES (newID(), @mapGuid, @xColCount, 'A', @yRowCount)
SET @yRowCount = @yRowCount + 1
END
SET @xColCount = @xColCount + 1
END