Formatting adds unneeded spaces
torsten.strauss
Posts: 271 Silver 3
Hi!
The formatting seems to add additional spaces after the last SELECT and WHERE which are unneeded.
Would be nice to get this sorted -thanks!
--get the transactions covered by the active CFPs
DECLARE @lower_bound_tsn bigint ;
DECLARE @upper_bound_tsn bigint ;
SELECT
@lower_bound_tsn = MIN(xcf.lower_bound_tsn)
, @upper_bound_tsn = MAX(xcf.upper_bound_tsn)
FROM sys.dm_db_xtp_checkpoint_files AS xcf
WHERE
xcf.file_type = 2
AND xcf.state = 2 ;
SELECT * FROM sys.fn_dblog_xtp(NULL, NULL) WHERE tx_end_timestamp BETWEEN @lower_bound_tsn AND @upper_bound_tsn ;
The formatting seems to add additional spaces after the last SELECT and WHERE which are unneeded.
Would be nice to get this sorted -thanks!
--get the transactions covered by the active CFPs
DECLARE @lower_bound_tsn bigint ;
DECLARE @upper_bound_tsn bigint ;
SELECT
@lower_bound_tsn = MIN(xcf.lower_bound_tsn)
, @upper_bound_tsn = MAX(xcf.upper_bound_tsn)
FROM sys.dm_db_xtp_checkpoint_files AS xcf
WHERE
xcf.file_type = 2
AND xcf.state = 2 ;
SELECT * FROM sys.fn_dblog_xtp(NULL, NULL) WHERE tx_end_timestamp BETWEEN @lower_bound_tsn AND @upper_bound_tsn ;
Comments
I haven't been able to replicate this locally. Is the code you are putting in the forum the before or after?
If I paste it into SSMS and use Prompt to format it looks okay to me coming out as
DECLARE @lower_bound_tsn BIGINT;
DECLARE @upper_bound_tsn BIGINT;
SELECT @lower_bound_tsn = MIN(xcf.lower_bound_tsn) ,
@upper_bound_tsn = MAX(xcf.upper_bound_tsn)
FROM sys.dm_db_xtp_checkpoint_files AS xcf
WHERE xcf.file_type = 2
AND xcf.state = 2;
SELECT *
FROM sys.fn_dblog_xtp(NULL, NULL)
WHERE tx_end_timestamp BETWEEN @lower_bound_tsn
AND @upper_bound_tsn;
Dan Bainbridge
Product Support Engineer | Redgate Software