0

How can i edit the definition of a view without having to "script" it in SSMS?

The previous easy-to-use tools from Microsoft let me:

  1. Enter
  2. wait a moment
  3. Make change
  4. Carefully move mouse to large OK button
  5. Click OK
  6. Down Arrow
  7. goto 1

With SSMS i've having a much more tedious time of it:

  1. Carefully move mouse to small view to script
  2. Right-click
  3. wait a moment
  4. Carefully move mouse to small menu option Script View as
  5. Carefully move mouse to small menu option ALTER TO
  6. Carefully move mouse to small menu option New Query Editor Window
  7. wait a moment
  8. Press F5
  9. Carefully move mouse to tiny x icon
  10. Click close button
  11. Carefully move mouse to large No button
  12. Click No
  13. goto 1

i'm really not interested in scripting my view to a new query editor window. i want to edit the view definition. Microsoft seemed to implement editing the definition of a view by resorting to an ALTER VIEW in a new query window.

Is there a way to view/edit the definition of (a lot) of views, without having to resort to the UI tedium introduced with SQL Server Management Studio?

Ian Boyd
  • 5,293
  • 14
  • 60
  • 82

2 Answers2

1

Maybe you could give us a hint as to what the aforementioned "easy-to-use tools from Microsoft" were?

There is a View Designer in SSMS as an option. In Object Explorer, right-click a view, click Design or right-click the Views node and click New View..., but it is a bit limited. If your views are at all complex (ie- much beyond simple JOINs) you're pretty much going to be scripting it.

squillman
  • 37,883
  • 12
  • 92
  • 146
  • It doesn't matter, or affect the question, or answer. It's a tool that SQL Server 2005 refuses to accept a connection from. And since it's not supported since 2002, and has not been updated for 64-bit Windows, i can no longer run it without `Windows XP Mode`. Finally, the view designer modifies view definition formatting, and removes comments. – Ian Boyd Sep 19 '11 at 13:05
0
  1. Right click on the view.
  2. Left click on Design
  3. Make your changes in the query window.
  4. Close the designer and click on any prompts that come up
Wil
  • 1
  • Designer modifies the formatting, and removes comments, from views. – Ian Boyd Sep 16 '11 at 20:49
  • He more than likely, by his description, was previously using some kind of designer and made no mention of retaining formatting or comments ;) – Wil Sep 21 '11 at 19:02