Using SQL Server 2012 Management Studio, I can pull up the view in design view, I can see the graphical representation of the view and under it a listing of columns, is there any way I can see the complete SQL statement that generates the view?
You can right click on the view in Management Studio, then "Script View As" -> "Alter To" -> "New Query Editor Window"
Or... in a new query window....
Code:
sp_helpText 'NameOfViewHere'
Press CTRL-T to put the output in to text mode, and then run the query.
-George
Microsoft SQL Server MVP My Blogs SQLCop twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.