FETCH NEXT INTO not formatted
Joojooflop
Posts: 5 Bronze 2
The FETCH statement in the following code does not format correctly.
DECLARE @Col1 INT DECLARE Cur1 CURSOR FOR SELECT 1 AS Col1 OPEN Cur1 FETCH NEXT FROM Cur1 INTO @Col1 CLOSE Cur1 DEALLOCATE Cur1The FROM and INTO clauses are left in their original positions, without any adjustments to whitespace or indenting.
Comments
I can reproduce this here, so I can confirm that formatting the FETCH statement is something that SQL Prompt doesn't do.
I need to find out if the FETCH statements are supposed to be formatted (bug), or if it's something we need to add support for (feature).
I'll update this post when I find out.
This is being considered a bug, so we should hopefully address it in a future release.
For your reference the bug tracking code for this is SP-3019.