SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Using "Designer" view in SQL 2008 Mgmt Studio
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

waveform
Yak Posting Veteran

Australia
75 Posts

Posted - 07/26/2012 :  05:06:17  Show Profile  Reply with Quote
Using SQL Server 2008 Mgmt Studio, I have typed in an SQL query, but now want to change to "design view", like I used to do with SQL 2000 Enterprise Manager. That used to show me a design view at the top and the SQL text below it.

In SQL 2008 Mgmt Studio, I've tried the menu item Query -> Design Query In Editor, but this opens a new window with a blank editor. I want to show the *current SQL query text* in design view. How do I do that?

This is what I have in SQL Mgmt Studio at the moment:
http://i.imgur.com/OP3g6.gif (sorry for the blur eye-sore)

How do I get from there to a Design View of the query?
Sorry for the noob question. :)

Cheers!

Edited by - waveform on 07/26/2012 05:06:58

lionofdezert
Aged Yak Warrior

Pakistan
864 Posts

Posted - 07/26/2012 :  05:15:53  Show Profile  Visit lionofdezert's Homepage  Send lionofdezert a Yahoo! Message  Reply with Quote
select your query text and right click -- > Design Query in Editor

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page

waveform
Yak Posting Veteran

Australia
75 Posts

Posted - 07/26/2012 :  05:18:52  Show Profile  Reply with Quote
Gah, so simple and intuitive.. yet I didn't try it. :) Thank!
Go to Top of Page

waveform
Yak Posting Veteran

Australia
75 Posts

Posted - 07/26/2012 :  05:24:07  Show Profile  Reply with Quote
Hang on, this is looking really clunky and worse than 2000's Enterprise Manager.

I open the SQL in the Designer window (which takes AGES working remotely), then I arrange the tables visually (because it's a visual designer) but I can't RUN the query from there. I have to close the modal window, then run the query.

Then if I want to change something, I select it again, right-click, the Designer dialog opens and my tables are all scrunched up again and I have to rearrange everything! Unless I'm doing it wrong, that's incredibly awfully horrible. They've actually made the process slower, clunkier and harder to use than the previous version!

Please tell me I'm doing it wrong. :)

Edited by - waveform on 07/26/2012 05:25:42
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3426 Posts

Posted - 07/26/2012 :  06:03:00  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
You aren't doing it wrong. the tool is completely rubbish.

But, it's probably time to bite the bullet - the visual designer produces abjectly miserable code.

I'd strongly advise getting used to just writing the code yourself in management studio or visual studio. You'll see a benefit in the long run.

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/
Go to Top of Page

waveform
Yak Posting Veteran

Australia
75 Posts

Posted - 07/26/2012 :  14:10:02  Show Profile  Reply with Quote
I'm a programmer with knowledge of SQL, but am no DBA. Can you tell me in what way the designer produces bad SQL? I've previously relied on Enterprise Manager to produce my SQL - not that I couldn't write it, they're usually basic SELECTs with inner/outer joins - but it was easier just to plonk the tables in the designer and copy the resulting code.

I guess the question is, in what circumstances would writing one's own code be better than that produced by the designer?
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3426 Posts

Posted - 07/26/2012 :  18:46:48  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
gosh. where to start.... (and this is casting my mind back a long time to 2000 - 2005 transition when I last used any kind of deisner)

1) aliases are awful.
2) derived tables are hard to do.
3) windowing functions aren't supported (AFAIK) / are not obvious to use
4) support for APPLY (outer and Inner)

code formatting....

it usually managed to produce slightly better code than an ORM like hibernate but still....

post some code produced by it here (if you like) and we'll see...

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000