Removal of space before FROM in sub-query undesired, how to stop it?
dbouchard@tricomputer.com
Posts: 14 Bronze 2
in SQL Prompt
I have the following Sql query and Sql Prompt insists on removing the space before the FROM in the sub-query every time. How do I stop this?
SELECT TOP (50000000)
[Id]
, [SourceBranch]
, [DestBranch]
, [MachineName]
, [CreationTime]
, [Duration]
, (
SELECT COUNT(r.Id)FROM dbo.Results r WHERE r.RunId = Run.Id
)
FROM [dbo].[Run]
WHERE 1 = 1
AND CreationTime >= '2021-03-01'
AND Duration IS NOT NULL
ORDER BY Run.Id;
Tagged:
Answers
Thank you for raising this query. I'm going to open a support ticket for you so we can track the progress.
Regards,
David Harris.
Have you visited our Help Center?
What I would like to see is:
SELECT COUNT(*) FROM Table
With the setting unchecked, it gets formatted as:With the setting checked, it gets formatted as:
Can confirm that this also happens in Azure Data Studio.