Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Custom Command/Shortcuts How To?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pandalion
Starting Member

6 Posts

Posted - 12/19/2014 :  10:24:28  Show Profile  Reply with Quote
I want a shortcut to paste some SQL wherever my cursor is.

For example, I often need to describe a table. On Oracle and Netezza this is easy with desc and /d commands. But in SQL Server you have to type exec sp_columns table_name.

And to search for a table I have to type: select table_name from information_schema.tables where table_name like '%%'.

This is all too much work, and I'm certainly not browsing the tree structure using my mouse. That's unproductive.

I want the ability to hit couple of keys and have code inserted wherever my cursor is. For example I want to hit command keys and have it paste a template where I can quickly just type in the dynamic part.

Example: If i want to describe a table I just use short-cut keys and the text "exec sp_columns " is pasted wherever my cursor is and then I type the table name in manually.

Any way to do this in SQL Server or Windows? I connect to SQL Server over Citrix if that matters.

Thanks!

gbritton
Flowing Fount of Yak Knowledge

2780 Posts

Posted - 12/19/2014 :  11:15:38  Show Profile  Reply with Quote
In SSMS, you can use snippets. see under Tools menu. Ctrl-K Ctrl-X lets you insert snippets.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000