My 5 cents tip (you might know it already, but just in case)

Share your SQL code snippets for SQL Prompt!

Moderators: David Atkinson, Anu Deshpande, Luke Jefferson, Paul Stephenson

My 5 cents tip (you might know it already, but just in case)

Postby ivanrdgz » Sat Jul 11, 2009 5:26 am

I like to combine the SQL Prompt code snippets with the SQL Server Management Studio templates. I always liked the template (kind of the same idea of snippets) but SSMS lacks the ability of "calling" those templates right from your query window. I mean, you must go to the Template Collection, find the needed template and from there double click on it or drag and drop.

So, now what I do? I just create snippets using the template format. For example:

USE <Database, varchar,>
go

select * from <Table, varchar,>
go

Once I call it, I press CTRL+SHIFT+M and the template parameter window will show up allowing me to enter the defined paramaters of the current template.

Hope this will help someone :)
ivanrdgz
 
Posts: 10
Joined: Sat Jul 11, 2009 4:46 am

Postby aultmike » Tue Jan 19, 2010 4:35 pm

Awesome tip!
aultmike
 
Posts: 26
Joined: Fri Jan 08, 2010 3:49 pm
Location: Canton, OH

Postby AndrewJacksonZA » Wed May 05, 2010 12:19 pm

Thanks!!!
AndrewJacksonZA
 
Posts: 17
Joined: Wed May 05, 2010 11:09 am
Location: Johannesburg, South Africa


Return to SQL Prompt code snippets

Who is online

Users browsing this forum: No registered users and 0 guests

cron