Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

View - cannot see the source code??

Posted on 2013-06-03
3
Medium Priority
?
286 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

610 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