Solved

View - cannot see the source code??

Posted on 2013-06-03
3
275 Views
Last Modified: 2013-06-05
Hi I have a wierd problem in that I opened up my DB this morning and went into Design view of one of my Views.  I can see the tables, fields etc but no code for the SELECT query.  None of my other queries have this problem. I've tried moving the boundaries about to see if it's just obscured but to no avail on this specific View.  Unfortunately I don't have the code saved anywhere else and need to get to the code asap.  Please advise how I can view the code again for my View.  I'm using SQL Server 2012 (Express).
0
Comment
Question by:Lorna70
  • 2
3 Comments
 
LVL 25

Expert Comment

by:Lee Savidge
Comment Utility
Open a new query window
Press Ctrl + T to put the window in text mode
sp_helptext youviewnamehere
Copy the view text from the window below
Press Ctrl + D to put the window back into table mode
Save the view somewhere in your filesystem.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 250 total points
Comment Utility
Do your self a favor and ditch the Designer.  Instead open VIEWs, Stored Procedures, etc. in the query window, by simply right clicking the VIEW in Object Explorer and selecting "Script View as" | "Alter to"
0
 
LVL 25

Expert Comment

by:Lee Savidge
Comment Utility
I agree with acperkins.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now