There are so many cool tools available today for data visualization.   This posting covers pulling data from the AdventureWorks2012 database running on SQL Server 2012, and then using the Google Visualization tools to display geographic data. The final outcome …

Adventureworks2012 data to Google GeoChart Visualization Read more »

So far after playing around with SQL Server 2012 there are many new features to SQL.  Overall I think my favorites are in the Analytic Functions category.  Here is my breakdown of the top 10 transact SQL enhancements to SQL …

My Top 10 TSQL Enhancements in SQL Server 2012 Read more »

After the last post on Cumulative Distribution Function (CDF) or as it is known in TSQL CUME_DIST(), I realized that although I showed how to use it, I didn’t really explain what it means, or when to use it.  That …

Cumulative Distribution Function (CDF) – Analyzing the Roll of Dice with TSQL Read more »

With SQL Server versions 2008R2 and 2012, you can access the registry to get the settings for the current instance of SQL Server.  Here is how it works using the dynamic management view (DMV) called dm_server_registry. From there you get get …

Accessing the registry from TSQL on SQL Server 2012 and 2008R2 Read more »

After my CTE presentation at SQL Saturday 108 in Redmond, I was asked many questions, and received several great suggestions from people.  Based on that feedback, I am updating my presentation for SQL Saturday 114 in Vancouver to include some …

CTE Hierarchy compared to the alternative Read more »

The following question came up when working on my CTE presentation for SQL Saturday. Does a query that JOINs a CTE to itself execute the CTE query once or twice? For instance:  ;WITH deptCTE(id, department, parent)     AS (SELECT id,department,parent FROM   Departments) SELECT q1.department,q2.department   FROM deptCTE q1  INNER JOIN deptCTE q2 ON q1.id = q2.parent …

CTE Query Performance Read more »