When double clicking a view (default action edit view), any comments that are before the CREATE VIEW keywords are not displayed in either the 'Query Text' or 'T-SQL' tabs. Perhaps I am missing an option to enable this? The manual makes no mention of comments not being preserved.
In SSMS, when generating the script for the view object:
1) Highlight object in question.
2) Right-click to show context menu.
3) Select 'Script View as...' / 'CREATE to' / 'New Query Editor Window'
The generated script shows the comments preceding the CREATE VIEW AS keywords.
While this isn't a huge issue, it does prevent the maintenance of views using your product that have comments in the style mentioned. T-SQL comments after the CREATE VIEW AS are preserved in both SSMS and your product. I am using version 5.4.215 Professional in Windows 10 Pro.
TSQL comments not shown before CREATE VIEW statement
-
- Posts: 33
- Joined: Tue 06 Dec 2016 19:49
Re: TSQL comments not shown before CREATE VIEW statement
We will investigate this issue and will answer you as soon as possible.
Re: TSQL comments not shown before CREATE VIEW statement
We will fix this issue in the next product build and will notify you once it's available for downloading.