Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Format Support for TSQL #1130

Open
grantwforsythe opened this issue Apr 7, 2023 · 0 comments
Open

Add Format Support for TSQL #1130

grantwforsythe opened this issue Apr 7, 2023 · 0 comments
Labels
feature request New issue opened using "Feature request" template

Comments

@grantwforsythe
Copy link

Unable to properly format TransactSQL/TSQL.

As a very basic example, see the statement below:

Starting Value

BEGIN

DECLARE @Now [datetime] = GETDATE();

IF YEAR(@Now) > 2023
    PRINT 'It is 2023!'
ELSE
    PRINT 'It is **not** 2023!'
END

Expected

BEGIN
    DECLARE @Now [datetime] = GETDATE();
    
    IF YEAR(@Now) > 2023
        PRINT 'It is 2023!'
    ELSE
        PRINT 'It is **not** 2023!'
END

Recieved

BEGIN
DECLARE @Now [datetime] = GETDATE();

IF YEAR(@Now) > 2023 PRINT 'It is 2023!'
ELSE PRINT 'It is **not** 2023!'
END

Additional Info

My format configuration:

  "sqltools.format": {
    "reservedWordCase": "upper",
    "linesBetweenQueries": 2
  }
@grantwforsythe grantwforsythe added the feature request New issue opened using "Feature request" template label Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template
Projects
None yet
Development

No branches or pull requests

1 participant