And you thought that you only got $200 for passing GO, didn't you?  Well, this isn't Monopoly, my friends, this is SQL Server.  And while attending the PASS Community Summit this year, I saw Joe Webb do this trick.  I wasn't the only one in the crowd who went, "Wha???" when they saw it.

Most of you readers already know that GO is not a SQL command, but rather it is the commonly used word to separate batches.  In other words, the client tool (Query Analyzer, SQL Management Studio, OSQL.exe, etc.) parse whatever commands you execute, separating them into batches whenever GO is found.  (Actually, GO is not a magic word by itself, you can set the "batch separator word" to be whatever you want in the Options panel of Query Analyzer and Management Studio.)

Well, it turns out that in SQL 2005, a new option was implemented whereby you can put a number after the GO command and that will cause the batch to be executed that many times.  This does not work in SQL 2000 and earlier.  Here's an example if you want to test it out for yourself.

-- Create a test table to use in our test. CREATE TABLE dbo.TestGo (
) GO

-- Now a simple test to prove that this next batch is being executed multiple times.
INSERT INTO dbo.TestGo VALUES ('This is a test.') 
GO 500

-- Look at the records to prove it worked
FROM dbo.TestGo
-- Now let's cleanup after ourselves.
DROP TABLE dbo.TestGo 

So there you have it.  The batch that precedes the GO with a number is executed however many times you specify.  I cannot say at this point that I would recommend using that for anything other than ad-hoc testing, perhaps to simulate a load; or possibly to generate some quick test data.  But I thought it was a neat trick and after proving to myself that it really worked, thought I would share it.  And for those who are curious, yes, this is documented in Books On-Line.

UPDATED: Added formatting to code blocks.

PASS 2008: Women in Technology

I went to the Women in Technology lunch yesterday.  Yes, some of you will be quick to realize that I am not a woman, but the lunch is not exclusive to women.  Rather, it is about women who have achieved success in technology sharing tips and suggestions on how to do likewise.  Maybe as a guy it never really occurred to you that A) Technology is a very male-dominated career field and B) there are issues that professional women have to deal with that men just never (or rarely) even think about.

The luncheon was a huge success, with about 250 people in attendance.  Six years ago when this started at PASS, it was a small fraction of that, in the range of 65 or so.  Stephanie Higgins and others get a lot of credit for getting the annual event started, but I know that Denise McInerney deserves a lot of credit for her hard work over the last several years, too.  While, as a man, I was in the distinct minority, I would guess that there were a dozen or two other men in the room, which would work out to be 5%-10%.

The panelists this year were Billie Jo Murray, General Manager SQL Central Services from Microsoft; Crystal Robinson-Pipersburgh, Sr. Manager Database Administration from Intuit; Kimberly Tripp, SQL Server MVP and Microsoft Regional Director; Lynda Rab, Sr. Data Warehouse Analyst and PASS Program Director; and Kalen Delaney, SQL Server MVP, trainer and author.

While some of the subjects specifically covered issues that women must deal with, much of the advice given would be valuable to anyone looking to improve their career.  Here are a few highlights.

  1. Figure out what you are passionate about and focus on that.  Is it Performance Tuning?  High Availability?  Data Normalization?
  2. Get involved in the community.  Start a blog, attend local chapter meetings, etc.  You'll learn a lot, make new friends and contacts, and perhaps establish a reputation for yourself as being very skilled in the area that you are passionate about (see #1).
  3. What is your career goal / vision.  Billie Jo Murray mentioned that her experience with mentoring people, both men and women, is that men tend to have a specific goal in mind ("I want to be VP of ...") and women tend to be focused on the process ("what should I learn next?").  If you know where you want to go, it is much easier to figure out how to get there.
  4. Get mentoring.  Who, in the greater community, is in the position you seek, and will talk to you?  Ask them questions!
  5. Continuous Improvement:  What do you see where you are right now that could/should be improved?  What ideas do you have for how to make it better?  Work on being able to clearly communicate your ideas (solutions) to your boss or others.  But don't complain about systems if you aren't willing to put in the work to make things better.
  6. Hang around people who enhance who you are, yet allow you to be who you are.  Are your best friends in denial, or think that it is weird, that you work in technology?  That will hold you back.

I applaud PASS and all the people involved in putting together this luncheon.  Well done!  And let's keep striving to break down barriers and open up opportunities for any and all people who want to make their career in technology.