?
Solved

View - cannot see the source code??

Posted on 2013-06-03
3
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 39215695
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 1000 total points
ID: 39216063
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
ID: 39216066
I agree with acperkins.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

764 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