How do I display the /*comments*/ I have added to my SQL 2005 DB Views?

I added comments to my View for documentation purposes and when I saved the View the comments were removed from display.  How can I get them to display?  Is there maybe an option in the properties of SQL Server 2005?
pgetchellAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BrandonGalderisiCommented:
Where are you adding the comments?  As you can see from this example below, comments are persisted in the text of the view.
create view MYview
as
/*
Comment
*/
select 1 as 'a'
go
sp_helptext myview
go
drop view MYview

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pgetchellAuthor Commented:
I typed  my comment above the SQL Select statement just as you demonstrated.  I used SQL Server 2005's "wizard gui" View creator thing to make it.  I simply right clicked the VIEWS folder in the tree view of SQL Management Studio and selected "New View..." and wrote my query in the query window that appears and added comment tags  /**/ and when I saved the VIEW the comments disappeared or were removed.  I did not use the CREATE VIEW syntax.
0
BrandonGalderisiCommented:
Ok.  I have NEVER used the view wizard.  It makes creation of scripts for source control more difficult.

If you run the query above in SQL Server Management Studio's Query Tool, it works.
0
pgetchellAuthor Commented:
OK.  I appreciate your help.
0
BrandonGalderisiCommented:
This question has been sitting open for over 2 months.  I believe I answered your question.  Please close.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.