Archive for March 9th, 2009

Selecting and Executing Commented T-SQL Code

This may seem like a trivial “trick”. I thought so too at first, but I’ve found that I use this trick over and over again.

When developing scripts, often times I find myself commenting some blocks of code out, either to explore, to test, to debug, or to simply try out other T-SQL constructs. When you have commented code using the C-style comment, it is easy to select any block of code inside and execute them:

/*
SELECT * FROM sometable;
GO
SELECT * FROM anothertable;
GO
*/

But what if you used SQL Server Management Studio’s (SSMS) single line comment shortcut to comment out parts of your code?

SSMS - Single Line Comment Shortcut

Of course you can use the uncomment shortcut, but that’s still a bit of work. Highlight code, move mouse to SSMS toolbar, click on icon, execute. No I’m not a whiner, I just like doing things more efficiently when possible. Imagine, take that one icon click, and if you do it 10x or 20x in a day, it adds up :)

What you can do (or try) is to press the ALT key, then highlight the code you want to execute, then execute.

Selecting and executing commented T-SQL code

Selecting and executing commented T-SQL code

Small trick that saves you one icon click. Seemingly trivial, but believe me, it does make your work faster.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

DevTeach/SQLTeach in Vancouver 2009

Black Ninja Software is sponsoring DevTeach/SQLTeach in Vancouver, 2009! And we’re speaking too!

Our SharePoint Ninja, Shereen Qumsieh, will be talking about Leveraging Telerik Controls in SharePoint:

Telerik currently offers a full suite of powerful UI controls which seamlessly integrate into SharePoint and help developers build feature rich and highly responsive user interfaces for MOSS and WSS. In addition to their standard suite, Telerik offers a free version of the built in rich text editor that is cross browser compatible and offers support for the macintosh platform. This session will walk you through the steps for building SharePoint Web Parts and Custom Application Pages with specific code examples that leverage Telerik to provide a richer end user experience. We’ll cover a specific subset of the Telerik Web Controls including: RadGrid, RadComboBox, RadAjax and RadCalendar and I’ll also demonstrate briefly how to setup the Telerik RadEditor for SharePoint.

I (yups, SQL Ninja at Black Ninja Software) will be talking about Powershelling your SQL Server 2005/2008:

If you have used any kind of shell scripting before, you know how it can help automate tasks quicker and more efficiently. Powershell, a scripting language that leverages Microsoft .NET Framework, is finally supported in SQL Server. This session will dive deep into how you can use Powershell to create, maintain, manage and troubleshoot your SQL Server databases. This session will also cover differences between using Powershell in SQL Server 2005 and 2008.

A good friend, Yaroslav Pentsarskyy, will be talking about integrating Outlook with MOSS:

In many organizations SharePoint has become one of the most common collaboration tools. There is still, however, a habit of users trying to collaborate using Microsoft Outlook – sending versions of documents to one another. In this session, we’ll look at how you can integrate Microsoft Outlook 2007 and MOSS 2007 so that users can save their email attachments to predefined document library or their �My Site�. This powerful example will also uncover many other integration capabilities between MOSS and other MS Office 2007 applications. Having a convenient integration, users in many organizations will see more benefits in utilizing MOSS for their daily tasks. Participants will be supplied with the sample allowing them to implement the solution in their work environment.

DevTeach/SQLTeach Conference details below

Title: DevTeach/SQLTeach Vancouver 2009
Location: Vancouver, BC, Canada
Link out: Click here
Description (excerpt from DevTeach site): DevTeach / SQLTeach Vancouver 2009 will be the biggest developer, DBA and ITPro conference in Canada. It’s jam-packed with advanced sessions (level 300 and 400) all on the latest versions of Microsoft products and technologies. We have a track on .NET 3.5. We also have a .NET Agile and Software Architecture tracks. For this conference we have 54 .NET sessions, 34 SQL Server, 11 Visual Studio Team System, 17 Agile and 17 Architecture sessions and 12 SilverLight 2.0 sessions. DevTeach Vancouver 2009 is the training you can’t get any other way.
Start Date: 2009-06-08
End Date: 2009-06-12
Sessions: http://www.devteach.com/Session.aspx
Speakers: http://www.devteach.com/Speaker.aspx
Schedule: http://www.devteach.com/Schedule.aspx
Sponsors: http://www.devteach.com/Sponsors.aspx

If you are planning to attend (and why not, it’s great training all around!), Black Ninja has a promotional code that will save you $100 off the registration fee for the main conference. Get your promotional code from http://blackninjasoftware.com/devteach/ or call/email Black Ninja. We’ll help you.

DevTeach/SQLTeach Vancouver 2009 - Black Ninja Software Promotional Code

DevTeach/SQLTeach Vancouver 2009 - Black Ninja Software Promotional Code

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
`