Options

FETCH NEXT INTO not formatted

JoojooflopJoojooflop Posts: 5 Bronze 2
edited March 30, 2012 9:58AM in SQL Prompt Previous Versions
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.

Comments

  • Options
    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
  • Options
    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
  • Options
    JoojooflopJoojooflop Posts: 5 Bronze 2
    Thanks.
Sign In or Register to comment.