Settings and activity

  1. 41 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Harish Supe commented  · 

    1. Align as
    -- Unformatted code
    select
    LongColumnName as ln,
    c2 * c3 as result
    from
    dbo.SomeTable

    2. Align assignment/comparison operators/is null operators/logical operators

    -- Unformatted code
    update
    dbo.SomeTable
    set
    LongColumnName = 'Some value',
    c2 = 1
    where
    c3 = 'Something' and
    AnotherVeryVeryLongName is null and
    c5 is not null

    3. Align types, default values, parameter directions in stored proc/function definitions

    -- Unformatted code
    CREATE procedure dbo.DoSomething
    @p1 int,
    @VeryLongParametersName = null,
    @p2 int,
    @MayBeShorterName datetime output,
    @p4 datetime = 0 output,
    @ShorterName varchar(20),
    @b datetime,

    Harish Supe supported this idea  · 
  2. 109 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    28 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Harish Supe commented  · 

    Would really useful when you inherit large repository of SQL code from legacy systems/company merger/acquisition.

    Harish Supe supported this idea  ·