SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Shortcut to avoid typing something


Shortcut to avoid typing something

Author
Message
Luiz-458831
Luiz-458831
SSC-Addicted
SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)

Group: General Forum Members
Points: 442 Visits: 646
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.
Michael Earl-395764
Michael Earl-395764
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13303 Visits: 23078
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".
vidhya sagar
vidhya sagar
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1924 Visits: 620
Hi Luiz,

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


Regards..Vidhya Sagar
SQL-Articles
Luiz-458831
Luiz-458831
SSC-Addicted
SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)

Group: General Forum Members
Points: 442 Visits: 646
Thank you for your answers.
Is there a way to do it through Windows?

Luiz.
Eddie Wuerch
Eddie Wuerch
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2536 Visits: 2260
In SQL Server Management Studio:
Tools -> Options -> Environment -> Keyboard

-Eddie

Eddie Wuerch
MCM: SQL
Luiz-458831
Luiz-458831
SSC-Addicted
SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)

Group: General Forum Members
Points: 442 Visits: 646
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.
CAGreensfelder
CAGreensfelder
SSC-Enthusiastic
SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)

Group: General Forum Members
Points: 199 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.
Tom Garth
Tom Garth
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2001 Visits: 1499
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

CAGreensfelder
CAGreensfelder
SSC-Enthusiastic
SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)SSC-Enthusiastic (199 reputation)

Group: General Forum Members
Points: 199 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.
Luiz-458831
Luiz-458831
SSC-Addicted
SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)SSC-Addicted (442 reputation)

Group: General Forum Members
Points: 442 Visits: 646
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search