Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Shortcut to avoid typing something Expand / Collapse
Author
Message
Posted Monday, April 7, 2008 11:45 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 1:51 PM
Points: 74, Visits: 512
Hi guys,

I can't count how many times I have to type "SELECT * FROM" in the Management Studio Editor.
Is there a way to setup the Management Studio Editor (or maybe the Windows) to bring a text when I push a sequence of Shortcut.

Something like this: When I push CTRL-Shift-S then the text "SELECT * FROM" will be inserted in my editor.

Thanks,
Luiz.
Post #481027
Posted Monday, April 7, 2008 12:28 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
Time to pitch a Red-Gate product:
http://www.red-gate.com/products/SQL_Prompt/index.htm

You get some intellisense as well as shortcuts for frequently types "phrases".
Post #481056
Posted Tuesday, April 8, 2008 4:23 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 9:10 AM
Points: 416, Visits: 568
Hi Luiz,

You can go for SQL 2008 client tools where Microsoft have incorporated the above feature. :)


Regards..Vidhya Sagar
SQL-Articles
Post #481383
Posted Tuesday, April 8, 2008 11:38 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 1:51 PM
Points: 74, Visits: 512
Thank you for your answers.
Is there a way to do it through Windows?

Luiz.
Post #481763
Posted Tuesday, April 8, 2008 2:05 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 1:18 PM
Points: 442, Visits: 1,124
In SQL Server Management Studio:
Tools -> Options -> Environment -> Keyboard

-Eddie


Eddie Wuerch
MCM: SQL
Post #481869
Posted Tuesday, April 8, 2008 3:09 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 1:51 PM
Points: 74, Visits: 512
Eddie Wuerch (4/8/2008)
In SQL Server Management Studio:
Tools -> Options -> Environment -> Keyboard

-Eddie


Eddie,

Your suggestion allows me to execute execute something using a shortcut.
What I want is to insert a text in the Mgmt Studio Editor.

Well, a second thought: your idea may work if it is possible to include a command that copy a text to clipboard and then past it back to the editor. Something like this:

sp_copyToclipboard 'select * from'
sp_PastFromclipboard

Does anybody know if there is a command or proc that copies something to clipboard ?

Luiz.
Post #481901
Posted Wednesday, April 9, 2008 7:00 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, February 16, 2012 7:34 PM
Points: 59, Visits: 375
Clipmate, the clipboard-extender program I use, does that. You can evaluate it for 30 days, but then you'd have to buy the program.
Post #482260
Posted Wednesday, April 9, 2008 7:46 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, February 4, 2011 7:20 AM
Points: 977, Visits: 1,499
SELECT * FROM
Lets see. That took less than 2 seconds. CTRL>SHIFT>S ? Maybe a little quicker.

What I need is something to automatically correct the dyslexic version that I frequently end up with:

SELECT * FORM


Tom Garth
Vertical Solutions

"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
Post #482331
Posted Wednesday, April 9, 2008 8:01 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, February 16, 2012 7:34 PM
Points: 59, Visits: 375
Proably is overkill for "SELECT * FROM"

I use SQLServer Management Studio templates for things like:

SELECT c.Description as Clinic, a.ApptDate, 	
p.NameLast + ', ' +
COALESCE(p.NameFirst,'') + ' ' +
COALESCE(p.NameMiddle,'') + ' ' +
COALESCE(p.NameSuffix,'') + ' ' +
COALESCE(p.NamePrefix,'') AS PatientName,
CASE
WHEN MissedAppt = 'Y' THEN 'No Show'
WHEN MissedAppt = 'S' THEN 'Show'
WHEN Cancelled = 'Y' THEN 'Cancel'
ELSE '--' END as Disposition
FROM Appointment a INNER JOIN Clinic c
ON a.ClinicSID = c.ClinicSID
INNER JOIN Patient p
ON a.PatientSID = p.PatientSID

(got tired of typing the COALESCEs - takes me 3 tries to type it right, every time.)

It's a drag & drop rather than a hot-key but it comes with SSMS.
Post #482350
Posted Wednesday, April 9, 2008 1:41 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 1:51 PM
Points: 74, Visits: 512
Well, I see that it's not only me who has problems with "SELECT * FORM" and COALESCE.

It seems that Mgmt Studio still doesn't offer a solution for (the not only) my problem.

But as was pointed earlier, a third part solution, such as Clipmate, can help me.
Does anybody know one that is free?

Thanks,
Luiz.
Post #482585
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse