By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Selectively Executing Interactive SQL in Management Studio

P: n/a
Here's a question about getting the most out of the interface when
executing SQL in the interactive window of M

In TOAD (a popular front end for Oracle by Quest Software), the
equivalent of the F5 (execute) key is F9. In TOAD, if you hold the
<shiftkey while holding the F9 key, the parser will go to read from
the first non empty line above the cursor all the way to the last non-
empty line after the cursor and execute the statement.

You don't have to highlight the statement to execute it. For example
(see statements below my signature), if the cursor were anywhere on
the line that says "Column_B" (second statement) and you hit
<shift>F9, TOAD is smart enough to know you just want to execute
Statement 2. It knows not to execute Statement 1 and Statement 3
because of the blank lines between the statements

I find it a real pain to highlight the entire statement of interest
when I want to execute it. This may seem like a small deal, but the
TOAD <shift>Execute behaviour saves a lot of time. Is there a plug in
to Management Studio or a native option that will emulate this
behavior of TOAD? By the way, Quest does make a version of TOAD for
SQL Server. However, it's expensive, I didn't like the trial, and it
doesn't do the <shift>Execute behavior that I want.

Thanks,

Bill

Example Statements below

---Statement 1
SELECT
*
FROM
some_table_1

---Statement 2
SELECT
Column_A
,Column_B
FROM
some_table_2

---Statement 3
SELECT
*
FROM
some_table_3
Oct 19 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
bill (bi**********@gmail.com) writes:
I find it a real pain to highlight the entire statement of interest
when I want to execute it. This may seem like a small deal, but the
TOAD <shift>Execute behaviour saves a lot of time. Is there a plug in
to Management Studio or a native option that will emulate this
behavior of TOAD? By the way, Quest does make a version of TOAD for
SQL Server. However, it's expensive, I didn't like the trial, and it
doesn't do the <shift>Execute behavior that I want.
All I can suggest is http://connect.microsoft.com/SqlServer/Feedback.
Go there and submit a suggestion for such an option.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Oct 19 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.