Alignment
torsten.strauss
Posts: 271 Silver 3
in SQL Prompt
Hi Redgate Team.
SQL prompts will format the code like this:
Style : comma before
[code]
select *
from tab
where col in (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727'
-- xyz ( one space less)
, N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
from tab
where col in (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727'
-- xyz ( one space less)
, N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
[/code]
expected:
[code]
select *
from tab
where col in (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727'
-- xyz
, N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
from tab
where col in (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727'
-- xyz
, N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
[/code]
Style : indented
[code]
SELECT
*
FROM
tab
WHERE
col IN (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727', -- xyz
N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
*
FROM
tab
WHERE
col IN (
-- xyz
N'26544b76-162a-47cc-89a0-4626388b5727', -- xyz
N'6d009d71-cb2d-4196-ae51-8308827a3257'
);
[/code]
The comments are not aligned - would be nice to see a fix...
Thanks
Torsten
MVP Data Platform
Tagged:
Answers