Activity overview
Latest activity by StereoType
Hi, thank you for the fix, now 'OUTER APPLY' is following the Parentheses settings, but the problem with extra leading spaces in SUM and DATEDIFF clauses is still here: SELECT emp.EmployeeId
,history.WorkType1 - (history.WorkType2 + history.WorkType3)
FROM Emp.Employee AS emp
OUTER APPLY (
SELECT SUM( CASE WHEN hst.WorkType = 1 THEN DATEDIFF( DAY, hst.StartDate, CASE WHEN hst.EndDate < @ActualDate THEN hst.EndDate
ELSE @ActualDate
END
)
ELSE NULL
END
) AS WorkType1
,SUM( CASE WHEN hst.WorkType = 2 THEN DATEDIFF( DAY, hst.StartDate, CASE WHEN hst.EndDate < @ActualDate THEN hst.EndDate
ELSE @ActualDate
END
)
ELSE NULL
END
) AS WorkType2
,SUM( CASE WHEN hst.WorkType = 3 THEN DATEDIFF( DAY, hst.StartDate, CASE WHEN hst.EndDate < @ActualDate THEN hst.EndDate
ELSE @ActualDate
END
)
ELSE NULL
END
) AS WorkType3
FROM Emp.WorkHistory AS hst
) AS history
I have 'Expanded, simple' selected and 'Indent parentheses contents' unchecked in Parentheses settings. How to get rid of these extra spaces? / comments
Hi,thank you for the fix, now 'OUTER APPLY' is following the Parentheses settings, but the problem with extra leading spaces in SUM and DATEDIFF clauses is still here:SELECT emp.EmployeeId
,h...
Hi, do you have any news on this issue? / comments
Hi,do you have any news on this issue?
OUTER APPLY doesn't honor 'Parentheses style' settings
This is how SQL Prompt 8.2.3.2750 formats the code:
SELECT emp.EmployeeId
,history.WorkType1 - (history.WorkType2 + history.WorkType3)
FROM Emp.Employee emp
OUTER APPLY
(
SELECT...