Maximize the power of SQL Prompt with SQL Toolbelt Essentials. Watch now.

Bug in 6.4.0.633

jmeyerjmeyer Posts: 70 Bronze 2
edited September 22, 2014 12:30PM in SQL Prompt
Repo:
IF b = 0
BEGIN
  IF @a = 0
  BEGIN
    PRINT '0'
    IF @a = 0
      PRINT '0'
  END
  ELSE
  BEGIN
    PRINT 'not 0'
  END
END
If I disable "Indent BEGIN...END blocks and then format the SQL code the formatting looks correct as seen above.
However, if I first insert semicolons via Ctrl+B, Ctrl+C nad then format the SQL code I end up with an incorrect layout as shown below:
IF b = 0
BEGIN
  IF @a = 0
  BEGIN
    PRINT '0';
    IF @a = 0
      PRINT '0';
  END;
ELSE
BEGIN
  PRINT 'not 0';
END;
END;
[/code]

Comments

Sign In or Register to comment.