Hello my code is as follows:
DECLARE @cnt INT = 0;
WHILE @cnt < 256
BEGIN
SELECT
ITEM1 ,
ITEM2 ,
ITEM3
FROM Table_Name
SET @cnt = @cnt + 3
End
I want to do like below:
DECLARE @cnt INT = 0;
WHILE @cnt < 256
BEGIN
SELECT
ITEM@cnt+1 ,
ITEM@cnt+2 ,
ITEM@cnt+3
FROM Table_Name
SET @cnt = @cnt + 3
End
So that it will be executed in a single loop. Please help me regarding this.
Thank you in advance