Tabs

torsten.strausstorsten.strauss Posts: 271 Silver 3
edited March 6, 2018 11:00AM in SQL Prompt
Hi Redgate Team,

SQL prompt adds tabs between the ORDER BY which is not my intention:
WITH c
AS
	(
		SELECT
			LAG(cntr_timestamp, 1) OVER ( PARTITION BY counter_name ORDER BY
											  cntr_timestamp
										) AS lag_cntr_timestamp
		,	cntr_timestamp
		,	object_name
		,	counter_name
		,	instance_name
		,	cntr_value
		,	LAG(cntr_value, 1) OVER ( PARTITION BY counter_name ORDER BY
										  cntr_timestamp
									) AS lag_cntr_value
		,	cntr_value
			- LAG(cntr_value, 1) OVER ( PARTITION BY counter_name ORDER BY
											cntr_timestamp
									  ) AS delta_cntr_value
		,	( 100.0
			  / NULLIF(( LAG(cntr_value, 1) OVER ( PARTITION BY counter_name ORDER BY
-- a lot tabs !!!
													   cntr_timestamp
												 )
					   ), 0)
			)
			* cntr_value AS delta_pct_cntr_value
		FROM performance_counters
	)
SELECT
	object_name
,	counter_name
,	instance_name
,	cntr_value
,	lag_cntr_value
,	delta_cntr_value
,	delta_pct_cntr_value
FROM c
WHERE
	delta_cntr_value <> 0
AND c.object_name = N'MSSQL$MYSQLSERVER2017:Databases'
GO

Would be nice to get rid of these tabs - thanks!

Regards

Torsten

Version 9.1.1.4243

Answers

  • krzysztofkroczakkrzysztofkroczak Posts: 55 Silver 2
    edited March 8, 2018 1:56PM
    Hi @torsten.strauss,

    Sorry for your inconvenience, but I don't exactly understand what's the issue due to your custom style. Can you give us also script with the expected format? Then we could compare both.

    Best regards,
    Krzysztof
Sign In or Register to comment.