How can we help you today? How can we help you today?

Align Definition Data Types - extend to computed columns

I like the new option to align definition data types and constraints, but it doesn't seem to apply to computed columns.

For example, the following code is formatted with the new feature:
CREATE TABLE #Something
	(
		Something_SK				  INT IDENTITY(1, 1) NOT NULL
	   ,SomethingNumberWithLongerName NUMERIC(18, 16)
	   ,SomethingDate				  DATETIME2(0)
	   ,SomethingDateKey AS (CONVERT(INT, CONVERT(CHAR(8), SomethingDate, (112)), (0)))
	   ,SomethingTimeKey AS (CONVERT(INT, REPLACE(CONVERT(VARCHAR(8), SomethingDate, (108)), ':', '')))
	)
GO

Shouldn't the indentation of the AS keyword in the computed column definition be aligned with the data types of the other fields?
a.higgins
0

Comments

3 comments

  • James R
    Hi a.higgins,

    Thanks for letting us know! We've managed to reproduce this here, think this makes sense and will look into fixing it.

    Thanks,
    James
    James R
    0
  • James R
    Hi,

    Just to let you know we've just released a new beta build (7.3.0.681) which aligns computed columns together with data types and constraints.

    Give it a try and let us know what you think!

    Thanks,
    James
    James R
    0
  • a.higgins
    Looks very nice, thank you!
    a.higgins
    0

Add comment

Please sign in to leave a comment.