Comments
3 comments
-
Hi @torsten.strauss
If you uncheck the highlighted option, the last END should be aligned with CASE.
-
Hi Tianjiao ,nice to see a workaround but I consider this as a bug...What do you think?Thanks!
-
Hi @torsten.strauss
It looks like Collapse Case expressions shorter thancharacters overrules other settings for CASE. Therefore it needs to be cleared if that not needed.
Add comment
Please sign in to leave a comment.
N'SELECT name FROM sys.databases WHERE 1=1'
+ CASE WHEN @system_only = 1 THEN ' AND database_id IN (1,2,3,4)' ELSE '' END
+ CASE WHEN @dblist IS NOT NULL THEN ' AND name IN (' + @dblist + ')' ELSE
'' END;
The last END should be aligned with CASE or should be on the same line.
MVP