I have a procedure which is written using Oracle database and now I want to migrate it to SQL Server but I am having an issue when it comes to loop. As far as I know, SQL Server doesn't have "FOR" loop, it only has "WHILE" loop. The code is :
FOR something in columns
LOOP
PRINT('SOMETHING');
PRINT('SOMETHING');
END LOOP;
I want to convert it to SQL Server syntax but I have a problem when it comes to MS SQL syntax.
columns? What is your current T-SQL code?