You are currently browsing the archive for the Blogging category.

I Need Your Help

Dear reader,

Usually I’m helping you out by posting articles, quick tips or just some narration of my experience on my blog.  This time however I’m the one who needs your help.

I’m happy to announce that one of my articles – Your First OLAP Report, republished at SQLServerPedia – has been nominated in the 2010 SQLServerPedia Awards!

So, may I kindly ask you to vote for my article?  You can find it in the Business Intelligence category here:

As you can see, I’ve got quite some competition so I can really use all the votes.

Many thanks!!

PS: I’ll reward you by continuing to post articles and other posts on my blog ;-)

As usual, have fun!



Tags: , , ,

A while ago I had been thinking to do something about the amount of comments on my blog.  When I divide the number of comments by the number of visitors, I’m getting a really small percentage.  So small that the first two digits following the decimal separator are zeroes!

Maybe that’s because I’m not frequently asking people to actually comment on what I write.  Everyone is free to comment, but I’m not asking for it explicitly.  Most people will only post a comment when they don’t agree with what I wrote, or when they have an issue that might (or might not) be related to the post’s subject.  And some people will post a comment when they’re really satisfied with what I wrote, for instance because it saved them some/a lot of time.  But only a minority of visitors are actually doing that.

And that’s okay, I’m not expecting everyone to post a comment every time they read something here.  On the other hand, that means that I don’t know anything about you besides what the web statistics tell me.  All I have are some numbers indicating things like “most visitors are coming from the US”, or “post A was the most read post in the last X months”.  But it doesn’t really say anything about you: what’s your name, what are your daily activities, who do you work for, and so on.

But, Who Are You?

Then I came across a blog post by Adam Machanic, where he’s doing exactly what I’d been thinking.  His post is titled Who Are You?.

Following his example, I’m asking you now to post a comment here.  Tell me (and the world) something about yourself, anything.

In case you want to know something about me, I’m sure there’s plenty to be found on this very site, for instance in my About page.

If there’s something about me that you couldn’t find and want to know, post a question here and I’ll answer.

And How Do You Stay Fit?

Cube Reaction Pro Now that I’m asking for some interactivity from you, let’s add one more question.  Given our profession, we’re probably not getting enough physical activity during our regular daytime tasks.  So, what are you doing to stay in shape?

I tried running for a while but found that I couldn’t get myself into those running shoes frequently enough.  Then my eldest daughter started to take swimming classes.  And I decided to go swimming as well while she’s being kept busy by the swimming instructor.  So every Wednesday evening I swim for about half an hour.  In that time I can do 700-800 meters.

And recently I’ve added an additional sport to the list: mountain biking.  I try to get on the bike once a week, either Saturday or Sunday.  Distances so far reach between 25 and 55 kilometers.  Terrain so far includes small paths through forests (known as single track), mud, roots and trunks, cobblestone, sand, paths through agricultural fields and also regular road.  The region where I’m doing this is not flat either, so physically this requires quite a bit more than swimming.  But I really like it, it gives me a sense of freedom and I get to see some nice landscapes, and trees from real close-by.  Currently I’m using a second-hand bike which I have bought for a good price from my brother-in-law but by next year’s Summer or so I’m planning to buy a new one.  So the MTB on the picture is not my bike yet, but it’s one of the possibilities on my list for next year.  I’ve got official dealers for Cube, Trek and Specialized close-by so it’ll be a difficult choice :-)   If you happen to know one of these brands and you’re happy with it, do post a comment to share your experience!

With these two sports on my list of sports activities, I’m happy and I can feel the difference as opposed to no extra activity at all.

How about you, what do you do to keep up the shape?

Looking forward to those replies!




In this post I’ll be comparing the different places where I write blog articles.

Here’s the location list:

  • home office
  • garden
  • train
  • work

At Home

My Office

The pink animal clock of Windows 7My home office is the place where I’ve written most of my posts so far.  It’s a quiet place, even when the kids are at home, because there’s a hallway in between that room and the living room.  So it’s a good place to write, easy to concentrate.

Our youngest daughter though, three years old, may occasionally take a peek through the glass door.  In fact, sometimes she even comes and sits on my lap to watch what I’m doing.  Her favorite clock type in Windows 7 is the pink animal, not sure what type of animal it is.

But that’s okay, as I’m using my free time to write these articles I occasionally need life to interfere and remind me about that fact.  That’s usually the time to stop writing and spend some time with the family.


  • Fast internet connection
  • Quiet, good for concentration


  • No fresh air

My Garden

Weather forecast for today, June 4th 2010: 23°C!Now that the weather has started to prepare Belgium for Summer, I prefer to spend my spare time outside sitting in our garden.  And sometimes, usually during the nice warm weekends, I want to use some of that time to produce an article.  With my wireless network, parasol, table and chair, I’m all set up for it.  While sitting outside I can even keep an eye on the kids, who are also outside playing with their slide, trampoline, swing, …


  • Can get something done while not missing out on the nice weather
  • Internet access (provided you’ve got a wireless network)


  • Laptop seems to run a bit warmer, probably because it’s warmer outside than in my office
  • Need an electricity plug for longer sessions

On The Road

In The Train

My new Swiss Gear Ibex 17-Inch Notebook Backpack Recently I’ve bought myself this backpack and it was the best thing I could buy.  My current client are the Belgian Railways.  Their offices are of course located close to a train station, so most of the time I’m commuting to/from work by train.  A one-way trip takes about 45 minutes and my main occupation so far has been reading or sitting with my eyes closed listening to music.

Until now.  With this new backpack I can easily take my laptop with me and use it to write, or to play with SQL Server, prepare a demo, ….  In fact, right now while I’m typing this I’m sitting on the train.  Without the backpack it was just too painful.  I need to walk about 8 minutes to get from the train station to the offices of my client and with the standard Dell bag the weight of the laptop is just too much on my shoulder.

In the mornings I still close my eyes though, that’s just too early to get something useful done anyway.


  • No time wasted doing nothing
  • More free time at home to spend with wife and daughters


  • No internet – no quick lookups
  • No internet – publishing will be delayed
  • No internet – links will need to be added later from another location in my list above
  • May get noisy on the crowded trains – difficult to concentrate
  • No mouse connected due to not enough space – I so miss it!
  • No electricity (but my battery lasts long enough so not an issue)

At Work

Well, actually, I’m just kidding here.  You thought it was for real?  Did you jump down straight from the top to get to this section?  I think I may have scared a couple of people, such as my employer.  Which is actually the intention of this paragraph, ha! (If you’re one of those, post a comment!) :-)

I’m not one of those guys who has the possibility to blog and get paid for it.


Even though I’ve listed quite some cons on writing while sitting in a train, I still like it.  Just because it’s much more productive than anything else that can be done at that time, and the time spent on the train is not something that’s optional or depends on a decision.  At home I can decide to make some time free for writing, whether if it’s in my office or in the garden.  But the train is a place where I will certainly spend some time each working day.  I can’t decide to not spend time on the train.  Except when I commute by car – which is something I do when I’ve got a meeting or info session in the evening – but that’s another story.

Real conclusion: sometimes buying a backpack can save you time.

Time for me to start the weekend and get off the train!

Have fun!




If you’re using Google Reader and you’ve got a WordPress blog then I’ve got a really useful tip for you!

Especially if you want to save time maintaining all those links in your blogrolls.

You can synchronize your blogrolls on your blog with folders in your Google Reader. Which means zero maintenance for your blogrolls: they’re automatically updated when you update your Reader subscriptions.

I actually found this solution on another site so I’ll just point you there:

You can see it in action in my sidebar on the right. Several of those link lists are being fed from Google Reader, such as the one called "SQL Blogs @Microsoft".

Happy blogging!



Tags: , ,

Here’s a tip for anyone who’s using Windows Live Writer for blogging and wants to paste code into the articles.

Ever since my first code post back in July 2008 I have tried about four different Live Writer plug-ins to get the code formatting right.  Three of those are still installed today and I regularly use two of them.  As I post code samples in several languages (SQL, MDX, C#, VB, XML, …) I need the plug-in to support all those languages and to turn the code into decent output.  It would be ideal if I could do all this with just one plug-in.

Disclaimer: the code shown in this article is copied from my own blog or from Microsoft code samples.  They are not guaranteed to be complete and are just for demonstration purposes.  No explanation is provided on what the code is supposed to be doing either.

The Old Stuff

Following three screenshots will show you those three plug-ins in action.

Code Snippet

More info through this link and even more info on the author’s blog.

Code Snippet in action with some C# code

Colorized Code

More info through this link

Code Colorizer in action with some T-SQL

Source Code Formatter

More info through this link

Source Code in action with some XML

This last one is the one that I don’t use very often – to be honest I don’t even remember what I’ve actually used it for…

Now, back to the real reason for this article.

Time For Something New

As I mentioned before, I’m not extremely happy with the fact that I need to use several plug-ins for a similar task.  I keep forgetting which one the more interesting one is for SQL, or for C#, or whatever, I think you get my point.  It would be perfect if one plug-in could do all this.  And it has taken me quite a while but I think I may finally have found that one plug-in.  You can see it in action in my previous post.  Doesn’t that look nice?

What I like most about this plug-in is that the developer has taken a different approach to get the formatting done.  All other plug-ins that I’ve tried required me to paste the code into a pop-up window and select the right programming language, as I’ve shown you above.  This one is much simpler: it takes what is stored in the clipboard, including the formatting!

In my opinion this has two interesting advantages:

  • Faster: no messing around with a pop-up window
  • Accurate: as it uses the formatting as provided by the application from which it was copied, it will look exactly the same!  Which is something that I can’t say about the other plug-ins.

Okay, this means I don’t have any other options either, no line numbering, no alternating background coloring, …  But who cares when the output looks good?  And I don’t use those extra features anyway.

Here are some pasted snippets using my new favorite plug-in.

SQL copied from the Management Studio (SSMS 2008)

--a comment
declare @number int = 42;
declare @character char(1) = '0';
declare @expectedLength int = 8;
/* a block comment */
select REPLICATE(@character, @expectedLength - LEN(@number)) 
+ CAST(@number as varchar(8)) as Result;

MDX Copied From SQL Server Management Studio (SSMS 2008)

SELECT NON EMPTY { [Measures].[Reseller Sales Amount], [Measures].[Reseller Order Quantity] } ON COLUMNS,
NON EMPTY { ([Geography].[Geography].[Postal Code].ALLMEMBERS ) }
FROM [Adventure Works]

C# Copied From Visual Studio (VS 2008)

public partial class StoredProcedures
    public static void WeatherSP(string zipCode)
        Weather myWeatherWS = new Weather();
        WeatherReturn weatherResult = myWeatherWS.GetCityWeatherByZIP(zipCode);

        SqlMetaData[] recordMetaData = new SqlMetaData[2];
        // layout of the records that we'll return
        recordMetaData[0] = new SqlMetaData("Description", SqlDbType.Char, 100);
        recordMetaData[1] = new SqlMetaData("Value", SqlDbType.Char, 1000);

        // build a record based on the metadata
        SqlDataRecord record = new SqlDataRecord(recordMetaData);

        // let's start sending result into the active pipe

XML Copied From Visual Studio (VS 2008)

<?xml version="1.0" encoding="utf-8" ?>
        <add key="MyWebService" value="http://MyWebServiceServer:MyWSPort/PathTo/MyWebService.asmx" />

VB.NET Copied From Visual Studio (VS 2005)

#Region "AddColumnInformation"

    '/ <summary>
    '/ Stores the column information of the provided input and output objects in a ColumnInfo object.
    '/ This method is called by the RemoveDuplicates component during PreExecute when the BufferManager
    '/ is available, and assumes the exact same number of input and output columns.
    '/ </summary>
    '/ <param name="bufferManager">The IDTSBufferManager100; used to locate the columns
    '/ in the input and output buffers.</param>
    '/ <param name="output">The output of the component.</param>
    '/ <param name="input">The input of the component.</param>
    <System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")> _
    <System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId:="System.Exception.#ctor(System.String)")> _
    <CLSCompliant(False)> _
    Public Sub AddColumnInformation(ByVal bufferManager As IDTSBufferManager100, ByVal output As IDTSOutput100, ByVal input As IDTSInput100)
        If input Is Nothing Then
            Throw New ArgumentNullException("input")
        End If

        If output Is Nothing Then
            Throw New ArgumentNullException("output")
        End If

        If bufferManager Is Nothing Then
            Throw New ArgumentNullException("bufferManager")
        End If

        If input.InputColumnCollection.Count <> output.OutputColumnCollection.Count Then
            Throw New Exception("Input column collection does not match the output column collection.")
        End If

        For x As Integer = 0 To output.OutputColumnCollection.Count - 1
            Dim colInfo As New ColumnInfo()
            Dim outCol As IDTSOutputColumn100 = output.OutputColumnCollection(x)
            Dim inCol As IDTSInputColumn100 = input.InputColumnCollection(x)

            ' Set the buffer column index for the input column and the output column.
            colInfo.inputBufferColumnIndex = bufferManager.FindColumnByLineageID(input.Buffer, inCol.LineageID)
            colInfo.outputBufferColumnIndex = bufferManager.FindColumnByLineageID(output.Buffer, outCol.LineageID)

            ' Save the column
        Next x
    End Sub
#End Region
End Class

One feature though that I’d like to see is a horizontal scrollbar when the code lines are longer than the width of the code block.  Right now it automatically wraps the text which makes it a bit difficult to read.  So I have to pay attention when pasting code.  Although it’s not always obvious, you can see this wrapping occur in three of the above code snippets (MDX, XML, VB.NET).

To conclude this article: the new plug-in that I’m using is called Paste from Visual Studio (or VSPaste), developed by Douglas Stockwell.  You can download it here.

Out of curiosity, I wonder how it performs when pasting formatted text from Word (2007):

PrFont34Bin0BinSub0Frac0Def1Margin0Margin0Jc1Indent1440Lim0Lim1Some bold text
And some italic
Italic, bold and underline in combination
Text in blue and green and red on one line

Okay, ow, look at that, I’m writing in red now, that can’t be the intention! Luckily Live Writer allows me to switch back to black.

Update: the “writing in red” was apparently only visible in Live Writer…

So, conclusion: VSPaste not only works when pasting from Visual Studio, SQL Server Management Studio is working perfect as well!  But Word is not.  But that’s not a problem :-)

Happy blogging!



Tags: ,

« Older entries § Newer entries »

© 2008-2019 BI: Beer Intelligence? All Rights Reserved