| Author |
Topic  |
|
|
waveform
Yak Posting Veteran
Australia
75 Posts |
Posted - 07/26/2012 : 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!
|
Edited by - waveform on 07/26/2012 05:06:58
|
|
|
lionofdezert
Aged Yak Warrior
Pakistan
864 Posts |
|
|
waveform
Yak Posting Veteran
Australia
75 Posts |
Posted - 07/26/2012 : 05:18:52
|
| Gah, so simple and intuitive.. yet I didn't try it. :) Thank! |
 |
|
|
waveform
Yak Posting Veteran
Australia
75 Posts |
Posted - 07/26/2012 : 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. :)
|
Edited by - waveform on 07/26/2012 05:25:42 |
 |
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 07/26/2012 : 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 Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. http://nosqlsolution.blogspot.co.uk/ |
 |
|
|
waveform
Yak Posting Veteran
Australia
75 Posts |
Posted - 07/26/2012 : 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
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 07/26/2012 : 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 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/ |
 |
|
| |
Topic  |
|