Options

SQLPrompt doesn't recognize "rollup" as reserved word

I have set SQL Prompt to automatically remove those [silly] and [[[useless]] [brackets]]]] where possible. Great with inherited code...

However, I just ran into a situation where this causes an error. A predecessor had decided that "rollup" would be a great column name. SSMS marks this as reserved word, but SQL Prompt disregards that and strips off the brackets anyway. In most cases, that doesn't even cause an error.
....
Except when "rollup" is used in the GROUP BY clause, where SQL Server now expects it to be the ROLLUP() function and complains about missing parentheses.

Please fix to either always retain brackets around "rollup", or at least retain them when used in GROUP BY.
--
Hugo Kornelis
(SQL Server MVP, 2006-2016 + 2019-now // Friend of Red Gate)
Sign In or Register to comment.