• XQuery – Accessing the Attributes Axis

    Working with a sequence of attributes in XQuery is fairly straight forward with the “attribute” axis even if you don’t know or need to know the attribute names. By using this axis you can access all of the attributes within the given context node. The specific scenario I had was to find a particular duplicated node within the xml that had no attributes and delete it thus keeping the other node that I knew had attributes.

    In this particular case i used the count() function as …

  • Updated blog Site

    This post is mainly to test the syndication still works correctly from my heavily updated web/blog site so apologies for the non-SQL nature of it.

    Finally after promising myself to do so since late 2013, I've actually got around to updating my blog site to the latest version of Orchard. I was running quite an old version and had to work through a number of issues to get it all working with the latest version hence keep putting it off! After a couple of days of mainly deleting incompatible …

  • Drop and Recreate all Synonyms

    Had a quick job the other day restoring a pair of databases under different names which is all straight forward enough, but each database in the pair uses quite a few synonyms to access objects in the other database. So with the pair of databases restored under new names, a quick script was needed to drop and recreate all the synonyms so that they point to the correct database name. This is easily achieved with a cursor and a little bit of dynamic SQL.

    DECLARE @ObjectName sysname, @Definition …

  • Convert UK Postcode to Latitude/Longitude/Northing/Easting using SQL CLR

    Just a quick post this time. I had a requirement to convert a small number of UK based postcodes to their latitude/longitude locations so I could use that data within some Tableau dashboards that I’m working on. I had a look around to see what I could find and quickly found both sites that exposed an API to do lookups and also sites publishing the full data as a download as well. As this was largely a one off, I didn’t want to go through the process of downloading the data and …

  • Using indexed views on ANY core SQL server edition

    I was having a discussion the other day and was quite surprised to hear that there still appears to be a slight misconception regarding being able to use indexed views on web or standard editions of SQL server. As it stands the documentation clearly states that you can create and use indexed views on web, standard, BI and enterprise editions of SQL server (I’m ignoring developer + evaluation as they are the same as enterprise). You can create a view, materialise that view in the form of a …

  • Thank You SQLBits!

    Just a very quick post to say thank you to all the organisers, speakers, helpers, sponsors, venue staff, caterers, party entertainers, long suffering partners and anyone else involved with the event as it was a top, top few days.

    This was my 3rd SQLBits after Liverpool + Nottingham and in just this short time, it is plain to see how much it has grown and how popular it has become. The quality of each and every facet seems to be getting better at each event. There was ample of space to network, …

  • Time for a change in career

    A few months back I made the decision to leave the relative comfort and security of my permanent role and head into the world of contracting & consulting. Whilst a big decision and change for me, it is something that I’ve long wanted to do at some point during my career when the time was right. Don’t get me wrong; I could quite easily spend another 10 years where I am now as they are a great company to work for and the software they develop makes a difference to people. I’ve been given a …

  • Deferred-drop tipping point

    I was intrigued by the deferred-drop feature that has been inside SQL since SQL Server 2000 SP3 after watching one of Paul Randal’s Pluralsight courses which was “Logging, Recovery and the Transaction Log”. The deferred drop feature is what allows for the seemingly instant truncation or drop of any table regardless of how big the table is. I wanted to find out a little more about it so after a quick Google, the number one result was this blog post from Paul which goes into the …

  • Most important feature of SQL 2014

    There are a whole raft of cool new features in 2014 including things like In-Memory OLTP, increased Azure integration/options and a new cardinality estimation design to name a few. But for me, one of the most important features in 2014 is the increase in memory that standard edition can use has been increased from 64GB to 128GB.

    I currently work for an ISV and the software solutions developed there have been utilising SQL server ever since 2000 was released. As time went on, every time a new …

  • Currys having apostrophe trouble

    Before I start I just want to say that much of this post is mere speculation on my part and not specifically targetted at Currys. They just happen to be the catalyst and example for this post.

    A few months back I ordered a new tumble drier online from Currys to replace an aging one that my family have long outgrown and chose Currys purely because they were selling the model I wanted at the cheapest price that I could find online. No problems with the transaction (or the service that was to …

  • 1
  • 2
  • 3
  • ...