SA0107 : Avoid using procedural logic with a cursor
The topic describes the SA0107 analysis rule.
Avoid using procedural logic with a cursor
The rule identifies CURSOR usage inside the code and notifies for cursor declarations.
Review your code and consider using a set-based solution instead of the cursor/iterative solution for the given task.
The rule has a Batch scope and is applied only on the SQL script.
Rule has no parameters.
The rule does not need Analysis Context or SQL Connection.
1DECLARE vend_cursor CURSOR 2 FOR SELECT BusinessEntityID, Name, CreditRating FROM Purchasing.Vendor 3 4OPEN vend_cursor 5 6FETCH NEXT FROM vend_cursor;
|1||SA0107 : Avoid using procedural logic with a cursor.||1||8|
© Ubitsoft Ltd. All Rights Reserved.