Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
waveform
Yak Posting Veteran
93 Posts |
Posted - 2012-07-26 : 05:06:17
|
| 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! |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2012-07-26 : 05:15:53
|
| select your query text and right click -- > Design Query in Editor--------------------------http://connectsql.blogspot.com/ |
 |
|
|
waveform
Yak Posting Veteran
93 Posts |
Posted - 2012-07-26 : 05:18:52
|
| Gah, so simple and intuitive.. yet I didn't try it. :) Thank! |
 |
|
|
waveform
Yak Posting Veteran
93 Posts |
Posted - 2012-07-26 : 05:24:07
|
| 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. :) |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-07-26 : 06:03:00
|
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 CharlieMsg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. http://nosqlsolution.blogspot.co.uk/ |
 |
|
|
waveform
Yak Posting Veteran
93 Posts |
Posted - 2012-07-26 : 14:10:02
|
| 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? |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-07-26 : 18:46:48
|
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 use4) 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 CharlieMsg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. http://nosqlsolution.blogspot.co.uk/ |
 |
|
|
|
|
|
|
|