January 16, 2004 at 10:37 am
Hi,
(this one should go in the "trivial" section, but there wan't one 🙂 )
Is there any way to autmatically "comment out" selected text in QA. If I have a long query I have to manually locate top & bottom and put in the
/* */ tags.
cheers,
yogi
January 16, 2004 at 10:55 am
What I sometime do....
IF 1=2 -- only line added to make next statement NOT execute
SELECT ......
IF condition statement [ELSE statement]
works only for 1 statement and does not require an "END"
as opposed to "conventional structured" ...
IF condition BEGIN {1 or more statements} END [ELSE BEGIN {1 or more statements} END]
Hope that helps
Once you understand the BITs, all the pieces come together
January 16, 2004 at 11:06 am
Select the code that you want to comment, then Ctrl + Shift + C comments all the text. To uncomment, select the text and Ctrl + Shift + R.
January 16, 2004 at 11:41 am
nice one.
ta, yogi
January 18, 2004 at 10:11 pm
BOL 2000:
Query Analyzer Keyboard Shortcuts
This table displays the keyboard shortcuts available in SQL Query Analyzer.
Activity |
Shortcut |
---|---|
Bookmarks: Clear all bookmarks. |
CTRL-SHIFT-F2 |
Bookmarks: Insert or remove a bookmark (toggle). |
CTRL+F2 |
Bookmarks: Move to next bookmark. |
F2 |
Bookmarks: Move to previous bookmark. |
SHIFT+F2 |
Cancel a query. |
ALT+BREAK |
Connections: Connect. |
CTRL+O |
Connections: Disconnect. |
CTRL+F4 |
Connections: Disconnect and close child window. |
CTRL+F4 |
Database object information. |
ALT+F1 |
Editing: Clear the active Editor pane. |
CTRL+SHIFT+DEL |
Editing: Comment out code. |
CTRL+SHIFT+C |
Editing: Copy. You can also use CTRL+INSERT. |
CTRL+C |
Editing: Cut. You can also use SHIFT+DEL. |
CTRL+X |
Editing: Decrease indent. |
SHIFT+TAB |
Editing: Delete through the end of a line in the Editor pane. |
CTRL+DEL |
Editing: Find. |
CTRL+F |
Editing: Go to a line number. |
CTRL+G |
Editing: Increase indent. |
TAB |
Editing: Make selection lowercase. |
CTRL+SHIFT+L |
Editing: Make selection uppercase. |
CTRL+SHIFT+U |
Editing: Paste. You can also use SHIFT+INSERT. |
CTRL+V |
Editing: Remove comments. |
CTRL+SHIFT+R |
Editing: Repeat last search or find next. |
F3 |
Editing: Replace. |
CTRL+H |
Editing: Select all. |
CTRL+A |
Editing: Undo. |
CTRL+Z |
Execute a query. You can also use CTRL+E (for backward compatibility). |
F5 |
Help for SQL Query Analyzer. |
F1 |
Help for the selected Transact-SQL statement. |
SHIFT+F1 |
Navigation: Switch between query and result panes. |
F6 |
Navigation: Switch panes. |
Shift+F6 |
Navigation: Window Selector. |
CTRL+W |
New Query window. |
CTRL+N |
Object Browser (show/hide). |
F8 |
Object Search. |
F4 |
Parse the query and check syntax. |
CTRL+F5 |
Print. |
CTRL+P |
Results: Display results in grid format. |
CTRL+D |
Results: Display results in text format. |
CTRL+T |
Results: Move the splitter. |
CTRL+B |
Results: Save results to file. |
CTRL+SHIFT+F |
Results: Show Results pane (toggle). |
CTRL+R |
Save. |
CTRL+S |
Templates: Insert a template. |
CTRL+SHIFT+INSERT |
Templates: Replace template parameters. |
CTRL+SHIFT+M |
Tuning: Display estimated execution plan. |
CTRL+L |
Tuning: Display execution plan (toggle ON/OFF). |
CTRL+K |
Tuning: Index Tuning Wizard. |
CTRL+I |
Tuning: Show client statistics |
CTRL+SHIFT+S |
Tuning: Show server trace. |
CTRL+SHIFT+T |
Use database. |
CTRL+U |
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply