Bug in 6.4.0.633
jmeyer
Posts: 70 Bronze 2
Repo:
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 ENDIf 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
Thanks for reporting this. I can recreate this locally and will look into a fix for you. I think we might be being a tiny bit overzealous with the semicolons here anyway as I don't think they're strictly necessary after BEGIN…END even in ANSI SQL.
Thanks,
Aaron.
The private build did fix the issue on my machine.
Thanks,
Jens
I've just uploaded a new stable build (6.4.0.641) which should have a proper fix for this, so it will be formatted correctly even with semicolons in there.