Wednesday, July 30, 2014

Cool SQL Server Management Studio editing trick

By Steve Endow

I've been using SQL Server Management studio since long before it was called Management Studio, but I regularly stumble across some new feature or shortcut that I never knew existed.

Today I was querying several tables.



I then wanted to delete the contents of all of those tables.  One trick I use is to hold down the ALT key to select a vertical column of text.  I use this to highlight the "SELECT *" text on all of the lines at once.


I am then able to delete the selected text for all lines.


 So that part I knew.  But now I wanted to put the word DELETE at the beginning of each of the lines.  Normally I would copy and paste it on every line.  But this time, I just started to type the word DELETE.


As I typed, the characters appeared on all of the lines simultaneously!  The thin gray line is the former selection area, and it essentially turns into a giant vertical cursor on all of the lines.


So I just typed the word DELETE once, and it appeared on all lines.  Presto!

Pretty cool.

I just tested this technique in my UltraEdit text editor, and it worked there as well.  It did not work in MS Word though.

Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter

http://www.precipioservices.com

No comments: