My script has a series of declared variables one after the other and the formatter keeps indenting further and further for each one down. Is there a setting to shut this off that I'm missing?
What it looks like before formatting:
DECLARE @Direction Nvarchar(Max) = (SELECT [Direction] From TempLayoutConfig) DECLARE @Platform Nvarchar(Max) = (SELECT [Platform] From TempLayoutConfig) DECLARE @Vendor Nvarchar(Max) = (SELECT [Vendor] From TempLayoutConfig) DECLARE @FileType Nvarchar(Max) = (SELECT [File Type] From TempLayoutConfig) DECLARE @Layout Nvarchar(Max) = (SELECT [Layout] From TempLayoutConfig) DECLARE @Delimiter Nvarchar(Max) = (SELECT [Fixed/Delimited] From TempLayoutConfig) DECLARE @KeepSource Nvarchar(Max) = (SELECT [Keep Source Field Names] From TempLayoutConfig) DECLARE @Headers Nvarchar(Max) = (SELECT [Headers] From TempLayoutConfig) DECLARE @Details Nvarchar(Max) = (SELECT [Details] From TempLayoutConfig) DECLARE @Trailers Nvarchar(Max) = (SELECT [Trailers] From TempLayoutConfig) DECLARE @LayoutVersion Nvarchar(Max) = (SELECT [Layout Version] From TempLayoutConfig)
What it looks like after formatting:
DECLARE @DIRECTION NVARCHAR (MAX) = (SELECT [DIRECTION] FROM TEMPLAYOUTCONFIG) DECLARE @PLATFORM NVARCHAR (MAX) = (SELECT [PLATFORM] FROM TEMPLAYOUTCONFIG) DECLARE @VENDOR NVARCHAR (MAX) = (SELECT [VENDOR] FROM TEMPLAYOUTCONFIG) DECLARE @FILETYPE NVARCHAR (MAX) = (SELECT [FILE TYPE] FROM TEMPLAYOUTCONFIG) DECLARE @LAYOUT NVARCHAR (MAX) = (SELECT [LAYOUT] FROM TEMPLAYOUTCONFIG) DECLARE @DELIMITER NVARCHAR (MAX) = (SELECT [FIXED/DELIMITED] FROM TEMPLAYOUTCONFIG) DECLARE @KEEPSOURCE NVARCHAR (MAX) = (SELECT [KEEP SOURCE FIELD NAMES] FROM TEMPLAYOUTCONFIG) DECLARE @HEADERS NVARCHAR (MAX) = (SELECT [HEADERS] FROM TEMPLAYOUTCONFIG) DECLARE @DETAILS NVARCHAR (MAX) = (SELECT [DETAILS] FROM TEMPLAYOUTCONFIG) DECLARE @TRAILERS NVARCHAR (MAX) = (SELECT [TRAILERS] FROM TEMPLAYOUTCONFIG) DECLARE @LAYOUTVERSION NVARCHAR (MAX) = (SELECT [LAYOUT VERSION] FROM TEMPLAYOUTCONFIG)
Any assistance would be appreciated. 🙂
Thank you!
Hi Mesanic,
thanks for your message.
Please select on the General Tab "SQL Server" as DB
Also in the "Select" Tab set the linebreaks like this
With these options set, I get this:
The linebreak before the "FROM" cannot be removed. Maybe I should add another option "Linebreak before FROM" or an option to remove linebreaks for small SQL statements
Regards