Logo SQLinForm


[closed]SQL Server Script Formatting.....

[closed]SQL Server Script Formatting.....
September 09, 2015 07:47PM
I am trying to figure out which formatting options I need to use to go from this:

[f1] [varchar](10) NOT NULL PRIMARY KEY,
[f2] [varchar](30) NOT NULL ,
[f3] [varchar](30) NOT NULL


To this:

Because your forum editor does not permit a fixed font, I'm using underscores to represent spaces)

______[F1]_______[varchar](180)_____NOT NULL PRIMARY KEY,
______[F2A]_____.[varchar](3)_______NOT NULL ,

Under the SQL format options I can find none that allow me to specify alignment of variable names,
data types, etc.

Some of the other SQL variants seem to do it correctly, but SQL SERVER dos not.

Edited 1 time(s). Last edit at 06/13/2016 11:19PM by guidomarcel.
Re: SQL Server Script Formatting.....
September 13, 2015 02:31PM
Hi c141heaven,
good to hear again from you. Your first visit was 6 years ago!!
Sorry to answer only today, I was in holiday for a couple of weeks.

Your remark is totally correct. For SQL Server there is no formatting and no alignment for tokens inside square brackets. Therefore the formatter is not aligning the vartypes one below the other.

Sorry, you can't reply to this topic. It has been closed.