SQL Server

  • Automating T-SQL Merge to load Dimensions (SCD)

    This is the 3rd post in the Frog-Blog series on the awesomeness of T-SQL Merge. Post 1: Introduction to T-SQL merge basics Post 2: Using T-SQL merge to load data warehouse dimensions In this post we’ll be looking at how we can automate the creation of the merge statement to reduce development time and improve reliability and flexibility of the ETL process. I discussed this in the 2nd half of a talk I gave at the UK technical launch of SQL…

    » Read more
  • Using T-SQL Merge to load Data Warehouse dimensions

    In my last blog post I showed the basic concepts of using the T-SQL Merge statement, available in SQL Server 2008 onwards. In this post we’ll take it a step further and show how we can use it for loading data warehouse dimensions, and managing the SCD (slowly changing dimension) process. Before we start, let’s have a quick catch up on what an SCD is… What is a Slowly Changing Dimension (SCD)? If you want a full explanation of…

    » Read more
  • Introduction to T-SQL Merge Basics

    A number of Frog-Blog posts over the next couple of months are going to make heavy use of the awesome SQL Server MERGE statement, introduced in SQL Server 2008. I thought it best to write an introduction post to provide the basics and groundwork for future posts. So what does the Merge statement do? Merge upserts data into a table. If, like me, you find the word ‘upsert’ more than a little ridiculous, we can scrap it in favour of a slightly…

    » Read more
  • Fast record count in SQL Server using sp_spaceused

    Just a quick tidbit today, but a very useful one. Ever need to do SELECT Count(*) on a very large table? It can take ages. Instead, use sp_spaceused EXEC sp_spaceused 'MyTable' It returns you a useful result set like name rows reserved data index_size unused MyTable 19690290 13637488 KB 3001688 KB 9986416 KB 649384 KB Not only does it also give you extra useful information about the table, but it comes back virtually instantly. Columns:…

    » Read more
  • SQLBits 9 Session – PowerPivot and QlikView 101

    Thank you to the SQLBits committee, speakers, helpers and attendees, for making SQLBits 9 one of the best yet. What a great example SQLBits is of the power of the SQL Server community coming together to help each other, and enjoy a few beers in the process! I was delighted to have my “PowerPivot & QlikView 101” session chosen by the committee, which I presented on Saturday afternoon. Thank you to all those who attended, great to…

    » Read more
  • New UK SQL Server User Groups

    What an exciting few weeks we’ve got to look forward to! SQL Bits starts on Thursday this week which promises to be another fantastic event. I’m speaking on the Saturday, presenting a session on QlikView and PowerPivot. When I’m not speaking I’ve got a list of duties as long as my arm, from marshelling to room monitoring, and of course representing the Community Corner. If you’re interested in SQL events local to…

    » Read more
  • SQL User Groups and SQLBits

    SQLBits 9 It only seems like yesterday since the SQLBits crew put on their awesome 8th conference in Brighton. The next conference has just been announced, SQLBits will move to Liverpool for SQLBits 9 – “Query Across The Mersey” (…Really?!) between September 29th and October 1st. Registration’s not yet open, but you can find out more at www.SQLBits.com I’ve already submitted two sessions to present, “PowerPivot & QlikView…

    » Read more
  • SQL Server Art using Spatial Data

    This post follows on from an earlier post on drawing with SQL Server, and explains how to create much more complex drawings using a couple of neat tricks and SQL Server spatial data. Firstly, apologies to those at my session at SQL Bits to whom I promised this blog post, I did say I’d try and get it posted in a week, and it’s been a month – but it’s here now! So, what are we trying to do? In my earlier post I demonstrated…

    » Read more
  • SQLBits 8 in Photos

    Well what a few days. Everyone I spoke to agreed that SQLBits 8 has been the best SQLBits conference yet. The organisers did a fantastic job, the whole event seemed to run incredibly smoothly and was very well received. I’m sure there’s a certain element of the swan effect, with frantic paddling behind the scenes, but they pulled it off very well indeed. A massive thanks for all of your effort. For me, this was the first SQLBits…

    » Read more
  • Drawing a logo or diagram using SQL spatial data

    I have to admit that I’m really excited about presenting a session at SQLBits 8 in Brighton next week. I’ve been an avid supporter of SQLBits since the first conference that I attended (SQLBits 2), and am thoroughly looking forward to finally getting a chance to be a part of the event and presenting my own session. If you’re going, I hope to see you there!   My session is about using SSRS, SQL spatial data and DMVs to visualise SSAS…

    » Read more