SQL Window functions cause error when formatting code
a_ted_w
Posts: 5 Bronze 1
for example:
SELECT @LibraryID
, c.CategoryNameLTID
, ROW_NUMBER() OVER (ORDER BY ID) AS Row
, @UserID
, @DateTime
FROM BestPracticeLibrary.Categories AS c;
perfectly valid SQL, but SQL Prompt does not like it.
SELECT @LibraryID
, c.CategoryNameLTID
, ROW_NUMBER() OVER (ORDER BY ID) AS Row
, @UserID
, @DateTime
FROM BestPracticeLibrary.Categories AS c;
perfectly valid SQL, but SQL Prompt does not like it.
Comments
(Replaced the variables by constants though)
SELECT
1 ,
c.CategoryNameLTID ,
ROW_NUMBER() OVER (ORDER BY ID) AS Row ,
2 ,
3
FROM
BestPracticeLibrary.Categories AS c;