Monday, 19 November 2007

Yep, the November CTP was released just hours, maybe minutes ago! As of now, they still haven't posted the link on the SQL Server home page. The downloads have been posted on the Microsoft Download Center for easier availability, follow this direct link to get to the bits:

There you can find DVD images and self extracting executables for x86, x64 and IA64. This CTP includes SQL Server Express Edition as well.

Happy downloading!

posted on Monday, 19 November 2007 20:21:55 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Sunday, 18 November 2007

I month ago my team (Åsmund Eldhuset, Frank Robert Kvam and me) came second in the Nordic Collegiate Programming Contest at NTNU (13th in total) and thereby qualified us for the Northwestern European Programming Contest (NWERC) in Utrecht, The Netherlands.

NWERC is happening this weekend, and the contest itself is today. You should be able to follow the standings live at, and if the web cam works (it doesn't right now, it looks like), you should be able to see us as well here:


posted on Sunday, 18 November 2007 08:57:22 (W. Europe Standard Time, UTC+01:00)  #    Comments [2]
 Wednesday, 14 November 2007

While we're waiting for the next SQL Server CTP, it thought I could mention a couple of small things already in the current CTP: Multiple row Insert and Declare-Set combined.

To insert multiple rows  in SQL Server 2005 and before, you had to execute multiple INSERT statements, or use UNION. The first would look like this:

INSERT INTO MyTable (Col1, Col2)
VALUES (1, 'One') INSERT INTO MyTable (Col1, Col2)
VALUES (2, 'Two') INSERT INTO MyTable (Col1, Col2)
VALUES (3, 'Three')

And using UNION it would be

INSERT INTO MyTable (Col1, Col2)
          SELECT 1, 'One'

In SQL Server 2008, this can be done like this:

INSERT INTO MyTable (Col1, Col2)
VALUES (1, 'One'), (2, 'Two'), (3, 'Three')

I did some quick performance testing and found that UNION and multiple inserts runs on about the same time, while the single inserts are slower. But this is only true as long as the numbers of rows being inserted isn't to high. If inserting 10 000 rows in one go, for instance, the individual inserts are actually faster, probably because of the amount of in-memory data the unions and the multiple row inserts produce, as well as that the last two commands run the whole batch within on large transaction.

Then, Declare-Set combined: It has long irritated me that I had to use two lines to declare a variable and assign a value to it. This is what it looks like i SQL Server 2005 and earlier:

DECLARE @var int
SET @var = 50

Now, in SQL 2008, we can do this:

DECLARE @var int = 50

We can also declare and assign to multiple variables in one go:

DECLARE @var1 int         = 50,
        @var2 varchar(10) = 'Hello!'

Pretty basic, and it's probably long overdue, but it's neat and it's finally here :-)

posted on Wednesday, 14 November 2007 05:06:28 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Tuesday, 13 November 2007

Microsoft Norway is running a gadget competition at these days where users can submit Vista Sidebar Gadgets and Windows Live Gadgets.

My contribution is a Vista Sidebar gadget where you can track packages and letters sent via the Norwegian Postal service, Posten. By entering you package tracking number, the gadget will get the latest updates for you package every 30 minutes and display its status in the sidebar. You can also click the envelope to open up the full package history in a fly out window.

So, if you like the idea, go to the competition site, and download my gadget from the "Gadget Gallery", or use this direct link to If you like it, please log in with your Windows Live account on and vote for me :-) You can win Vista Ultimate, a mouse or Expression Web just by voting :-)

posted on Tuesday, 13 November 2007 02:10:00 (W. Europe Standard Time, UTC+01:00)  #    Comments [3]
 Sunday, 04 November 2007

I've spent some time thinking about what factors determine exam results. It clearly depends upon the amount of effort you put into it (and the preparations) and your skill level, but also how lucky you are with the tasks you get on the exam. I think I've come up with a mathematical relationship for it :-)

Result = Effort x Skills x Fluke

That is, the exam result is the product of effort, skills and how lucky you are. Here, all factors are non-negative, which gives us a non-negative result as well. A result of zero is a fail, anything above that is a pass.

As we can see, if any of the three factors are zero, you will fail. This is easy to explain. First, if the effort is zero, you didn't even bother showing up on the exam, so you will clearly fail. Further on, if you have zero skills, you don't even know how to read, yet alone remember anything, so no matter how much effort you put into it, you will still fail. Finally, a zero luck means maximum bad luck. An example of this could be to get the following exam:

Task 1 of 1: (100 %)
Is P = NP? Prove your answer.

We can also get some more interesting relationships out of the formula. By dividing by Effort on both sides, we get
Result / Effort = Skills x Fluke.

This tells us that, if you got a non-failing grade on the exam, while the effort approaches zero, you either have extreme skills, or you had a huge amount of luck.

We can also get Result / Skills = Effort x Fluke. So if you got a passing grade, and have zero skills, you put in impossible amounts of effort, or had impossible amounts of luck, which is just not possible, so you could not possibly pass the exam.

So, by using this formula, you should be able to develop a strategy for receiving good exam results ;-) Good luck!

posted on Sunday, 04 November 2007 17:59:20 (W. Europe Standard Time, UTC+01:00)  #    Comments [3]