Life Is Good

I know, I know...I sound like Jimmy Stewart in "It's a Wonderful Life", but things are really good around here at the W blog.  So good in fact it's been hard to get to much blogging lately.

Part of this rosy disposition is thanks to Magenic for being a fun place to work and giving me a super sweet gift at our holiday party.  I'm not sure I've ever worked somewhere that gave presents, if so they obviously weren't worth remembering.

The biggest cause for celebration though is my daughter.  Her arrival this year has changed my life in many, many good ways.  I just can't wait to help her write her first SSIS package...

Oh well, enough sappiness and non-technical content.  Hope you are as happy as me while reading this.  If not, drop me a line.  Magenic is looking for talented people.  You could be this happy too.  ;)

-W


Posted by: whitneyw
Posted on: 12/18/2007 at 11:50 PM
Tags:
Categories: Blog
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Just GO already

A quick one today...I have been meaning to post this for a couple days but keep getting distracted. 

Do you know how to turn a simple query statement into a lean mean looping machine without while loops or cursors?  Okay, so maybe I've had too much coffee for one evening but I find this handy.  :)

Here's the simple syntax:

SELECT 'Woo hoo' AS myBrilliantOutput;
GO 5

This will give you 5 result sets in Management Studio.  Under the covers SQL Server is handling this as 5 separate requests.  It's not functionality that you're going to write into your application but for some quick and dirty load testing it can be super useful.  I also use this to insert sample data into a table for index testing.

So there's a couple good options available through pretty simple syntax.  If you use this for something other than the items listed drop a geek a line.  I'm always interested in seeing how other people do things.


Posted by: whitneyw
Posted on: 12/11/2007 at 11:52 PM
Tags:
Categories: Blog
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Sometimes it's the little things

I feel like I'm piling on the posts of Louis and Peter but I have to say row constructors are one of the things that really has me excited about the release of SQL 2008.  For those of you that aren't interested in reading the other posts, here's a quick example:

Pre SQL 2008 syntax:

INSERT dbo.myTable (col1, col2) VALUES (1, 'One');

INSERT dbo.myTable (col1, col2) VALUES (2, 'Two');

SQL 2008 syntax:

INSERT dbo.myTable (col1, col2) VALUES (1, 'One'), (2, 'Two');

Another great item that is included in SQL 2008 is variable initialization.  Here's another quick example:

Pre SQL 2008 syntax:

DECLARE @myVariable INT;

SET @myVariable = 1;

SQL 2008 syntax:

DECLARE @myVariable INT = 1;

While these features haven't gotten the props of spatial data, intellisense, etc. I think they will impact my day to day coding the most.  Anything that helps me express the same logic with less typing has my vote.

Speaking of intellisense, has anyone else been really bummed out about the implementation in CTP5?  Maybe I've gotten spoiled by Red Gate's SQL Prompt but I just expected more.  I'm hoping this functionality will be improving as we get closer to RTM.

If you haven't checked out SQL 2008 CTP5 yet Microsoft just made it even easier for you with the release of a VHD image.  It's a great way to check things out without disturbing your current install.  You can get it here.

Enjoy!


Posted by: whitneyw
Posted on: 12/7/2007 at 11:53 PM
Tags: ,
Categories: Blog
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed