How can we help you today? How can we help you today?

FETCH NEXT INTO not formatted

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 Cur1
The FROM and INTO clauses are left in their original positions, without any adjustments to whitespace or indenting.
Joojooflop
0

Comments

3 comments

  • Chris Auckland
    Thanks for your post.

    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.
    Chris Auckland
    0
  • Chris Auckland
    Sorry for the delay.

    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.
    Chris Auckland
    0
  • Joojooflop
    Thanks.
    Joojooflop
    0

Add comment

Please sign in to leave a comment.