Showing posts with label SSMS Tip. Show all posts
Showing posts with label SSMS Tip. Show all posts
Wednesday, July 28, 2010
Regular Expressions in SSMS
In one of my posts ,
I gave a tip how to replace
Enters in MS Word. We can
do this and a lot more in
SSMS itself by using
Regular expressions.
By pressing Ctrl+H in the SSMS you will open the "Find and Replace".
Choose in the Use option "Regular expressions".
Now, if you do not know how to use the regular expressions,
SSMS provides you a basic help, press the button with
bold arrow:
So, for example you want to replace Enters(new line seperators)
to commas(","), then enter "\n" in Find What text box and "," in
Replace with text box.
You can find more info here.
Wednesday, July 29, 2009
Incremental Search in SSMS
There is a regular,all known search option (Ctrl+F) in SSMS
that pops up a window.It is very feature rich search dialog
with many search options like search direction, wildcards,
regular expressions and etc.
There is one problem with exact matches,for example
suppose you are entering "errors" in the search box,
words like "error" will be not found.
There is less known Incremental Search feature in SSMS.
Just hit Ctrl+I and start typing what are you looking for.
After each keypress, SSMS will jump to matching words.

that pops up a window.It is very feature rich search dialog
with many search options like search direction, wildcards,
regular expressions and etc.
There is one problem with exact matches,for example
suppose you are entering "errors" in the search box,
words like "error" will be not found.
There is less known Incremental Search feature in SSMS.
Just hit Ctrl+I and start typing what are you looking for.
After each keypress, SSMS will jump to matching words.
You can see at the botton of the window what you
typed for the search.
Like here for example I searched for "rate".
For summary you can use this shortcuts:
Press [Ctrl]+[I] and start typing to search as you type.
[CTRL]+[I] = Incremental Search
[CTRL]+[SHIFT]+[I] = Back Search
[F3] – Find Next
[SHIFT]+[F3] – Find Previous
So,go ahead and try it.
Tuesday, July 28, 2009
How to Comment/Uncomment Code in SSMS 2005/2008
Using keyboard shortcuts you can pretty fast to
comment/uncomment code line(s) in Query Analyzer/SSMS.
In Query Analyzer(SQL Server 2000) this can be done by:
Ctrl+Shift+C - To Comment the current line, or selected lines of code.
Ctrl+Shift+R - To Uncomment the current line, or selected lines of code.
In SSMS (SQL Server 2005/8) use tho following combinations:
Ctrl+K,C - To Comment the current line, or selected lines of code
Ctrl+K,U - To Uncomment the current line, or selected lines of code
comment/uncomment code line(s) in Query Analyzer/SSMS.
In Query Analyzer(SQL Server 2000) this can be done by:
Ctrl+Shift+C - To Comment the current line, or selected lines of code.
Ctrl+Shift+R - To Uncomment the current line, or selected lines of code.
In SSMS (SQL Server 2005/8) use tho following combinations:
Ctrl+K,C - To Comment the current line, or selected lines of code
Ctrl+K,U - To Uncomment the current line, or selected lines of code
Tuesday, July 21, 2009
SSMS 2008 - Object Explorer Details Tip
Select some database in 'Object Explorer' window
in SSMS 2008 and open 'Object Explorer Details' window (Press F7).

In the screenshot you can see I marked "AdventureWorks",
The tip is that this area/bar can be expanded:

So you can move it up and see some basic properties of
the selected object:

This is also works if you select a Server,database,table or
stored procedure in the Object Explorer window.
So,try it yourself.
in SSMS 2008 and open 'Object Explorer Details' window (Press F7).
In the screenshot you can see I marked "AdventureWorks",
The tip is that this area/bar can be expanded:
So you can move it up and see some basic properties of
the selected object:
This is also works if you select a Server,database,table or
stored procedure in the Object Explorer window.
So,try it yourself.
Subscribe to:
Posts (Atom)