DECLARE curName CURSOR LOCAL FAST_FORWARD
FOR
select *
from mytablename
DECLARE variables
OPEN curName
WHILE 1=1
BEGIN
FETCH NEXT FROM curName
INTO variables
IF @@fetch_status <> 0
BEGIN
BREAK
END
--do work
END
CLOSE curName
DEALLOCATE curName
Fixing Common Pitfalls of Codemods
2 days ago