Indent clause content dynamically should add 1 more space
Posted: Thu 01 Nov 2012 13:49
I believe the option to indent clause content dynamically should add one more space. Currently, the algorithm appears to indent up to the next space of the previous line. I believe that the space itself should also be skipped which would result in a more pleasing look by maintaining column alignment.
Current Alignment:
Better formatting?:
Note also the indenting after FROM, ON, and WHERE. This would be my preference.
Current Alignment:
Code: Select all
CREATE FUNCTION dbo.fLookupRecIdBySiteId
(
@site_id AS INT
)
RETURNS VARCHAR(15)
AS
BEGIN
DECLARE @ret AS VARCHAR(15)
SELECT sp.parameter_rec_id
FROM dbo.sites s
INNER JOIN dbo.site_parameters sp
ON sp.site_id = s.site_id
WHERE s.site_id = @site_id
AND sp.parameter_type = 10
AND sp.parameter_value IS NULL
ORDER BY sp.parameter_initiate_time DESC
RETURN @ret
END
GOCode: Select all
CREATE FUNCTION dbo.fLookupRecIdBySiteId
(
@site_id AS INT
)
RETURNS VARCHAR(15)
AS
BEGIN
DECLARE @ret AS VARCHAR(15)
SELECT sp.parameter_rec_id
FROM dbo.sites s
INNER JOIN dbo.site_parameters sp
ON sp.site_id = s.site_id
WHERE s.site_id = @site_id
AND sp.parameter_type = 10
AND sp.parameter_value IS NULL
ORDER BY sp.parameter_initiate_time DESC
RETURN @ret
END
GO