Thursday, February 16, 2012

Adding Comments to a SQL2005 Query!

Hi everyone,

Has anyone else had problems trying to get comments to save in a view?

Every time you run or save the view, the comments disapear. Also all of the formatting / laying out of the query are lost also.

Anyone found a way to save them or keep your formatting?

Regards,

Steve

It depends on the program that you use to create the view. If you try to use the query design wizard (that automatically parses your SQL), then this will certainly be the case.

Try instead to create a new Query file (in SQL Management Studio). You'll notice that you get a different editor, and your code won't be modified as its parsed. In this mode, you'll also be able to add comments, and format your text as you wish, unheeded.

No comments:

Post a Comment