What are the challenges you face when working across database platforms? Take the survey

SQL Prompt - IF ELSE formatting not working as advertised

After upgrading to version, and typing the following into a query window:

IF 1 =1 PRINT 'HELLO' ELSE IF 2=1 PRINT 'Good Bye'

This is what I got after doing the Format:

IF 1 = 1
IF 2 = 1
PRINT 'Good Bye';

I was expecting the ELSE IF to be on the same line. I did a reset to the default formatting style.
Is the new feature not working or did I miss something?


  • Options
    Harry FrankishHarry Frankish Posts: 53 New member
    edited April 7, 2017 10:13AM
    HI pmagid

    Are you using the new formatting styles? You can turn these on by selecting "SQL Prompt > Options... > Labs > Experimental Features > Use new formatting styles"

    The default style there formats your example with ELSE IF on the same line:
    IF 1 = 1
        PRINT 'HELLO';
    ELSE IF 2 = 1
        PRINT 'Good Bye';

Sign In or Register to comment.