OVER (ORDER BY) breaks suggestions and code formatting
PerS
Posts: 3 New member
The following T-SQL breaks suggestions and formatting in SQL Prompt. There are no suggestions for #temp and val is not qualified when formatting.
SSMS version: 18.11.1
CREATE TABLE #temp ( val int NOT NULL ); SELECT val, LAG(val) OVER (ORDER BY val) AS prev_val FROM #temp AS t;
The following two code blocks do not break suggestions and formatting:
CREATE TABLE #temp ( val int NOT NULL ); SELECT val, /** LAG(val) OVER (ORDER BY val) **/ NULL AS prev_val FROM #temp AS t;
CREATE TABLE #temp ( val int NOT NULL ); SELECT val, MAX(val) OVER () AS max_val FROM #temp AS t;SQL Prompt version: 10.11.9.27382
SSMS version: 18.11.1
Tagged:
Answers
Are you able to recreate the issue on your end when connected to Azure Synapse?