Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Custom SSMS Shortcuts for ETL Developer. Part 1: SELECT in a Keystroke


Custom SSMS Shortcuts for ETL Developer. Part 1: SELECT in a Keystroke

Author
Message
Olga Klimova
Olga Klimova
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 94
Comments posted to this topic are about the item Custom SSMS Shortcuts for ETL Developer. Part 1: SELECT in a Keystroke

Olga Klimova
BI Consultant, MCITP
www.returnonintelligence.ca
davoscollective
davoscollective
Say Hey Kid
Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)Say Hey Kid (685 reputation)

Group: General Forum Members
Points: 685 Visits: 1003
Or, use Mladen Prajdic's SSMS tools pack and set up a "SQL Snippet" with a shortcut e.g.
"se"

To use it, Press se then the enter key and it will write out the snippet e.g. "SELECT Top 50 * FROM"

Its useful for commonly referenced long table names and all sorts of keywords and SQL phrases.


When I first started using SSMS I missed the history tool in Oracle SQL Developer so that's how I discovered the SSMS tools pack. I highly recommend it.
shayk
shayk
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 128
Nice, but the SP unnecessary. You can write in the SSMS "Select TOP 50 * FROM "
Carlo Romagnano
Carlo Romagnano
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3795 Visits: 3275
shayk (9/22/2011)
Nice, but the SP unnecessary. You can write in the SSMS "Select TOP 50 * FROM "

I also use this "Select TOP 50 * FROM ". It is better than sp, because if you connect to another server, maybe that the stored proc doesn't exist.

I run on tuttopodismo
Rahul The Dba
Rahul The Dba
SSC-Enthusiastic
SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)

Group: General Forum Members
Points: 165 Visits: 133
nice good concept but not much help full in practical field,,,, follow the previous comments
thankss

Rahul:-P
David McKinney
David McKinney
SSC Eights!
SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)SSC Eights! (863 reputation)

Group: General Forum Members
Points: 863 Visits: 2090
Thanks for the article. As has been pointed out, the stored procedure is not required, as there is a better way. (And I'm sure Olga will agree.)

However, if I hadn't read the article, I would not have considered either method. So thanks for bringing this to my attention!

I like it!
SaintGr8
SaintGr8
SSC Rookie
SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)

Group: General Forum Members
Points: 47 Visits: 118
Thanks for the insight you have given. I ran the s.procedure on Person.Person against Adventureworks2008 database. My query was like this:

CREATE PROCEDURE dbo.sp_select
@Person NVARCHAR(200)
AS
DECLARE @cmd NVARCHAR (255)

SET @cmd = 'SELECT TOP 50 * from ' + @Person
EXEC sp_executesql @cmd
GO

I set up the shortcut keys as well but when I ran pressed the keys, I got this error message:

Msg 201, Level 16, State 4, Procedure sp_select, Line 0
Procedure or function 'sp_select' expects parameter '@Person', which was not supplied.

Please, how do I go beyond this so I get the right answer?
Thank you!
gsc_dba
gsc_dba
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1625 Visits: 2004
SaintGr8 (9/22/2011)
Thanks for the insight you have given. I ran the s.procedure on Person.Person against Adventureworks2008 database. My query was like this:

CREATE PROCEDURE dbo.sp_select
@Person NVARCHAR(200)
AS
DECLARE @cmd NVARCHAR (255)

SET @cmd = 'SELECT TOP 50 * from ' + @Person
EXEC sp_executesql @cmd
GO

I set up the shortcut keys as well but when I ran pressed the keys, I got this error message:

Msg 201, Level 16, State 4, Procedure sp_select, Line 0
Procedure or function 'sp_select' expects parameter '@Person', which was not supplied.

Please, how do I go beyond this so I get the right answer?
Thank you!


Type and highlight the table name...then press your keyboard shortcut (eg CTRL + 5)

_____________________________________________________________________________________
[font=Courier New]gsc_dba[/font]
mslliviu
mslliviu
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 61
Nice article and a very good remider for shortcuts, only the sample is not very usefull.
PS: I can simply right click on table and choose the select top xx rows, as you can set the number of rows to any value you want
cgrigolini
cgrigolini
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 166
The sp doesn't work for tables which are not in dbo scheme
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